diff options
author | Max Christian Pohle | 2017-06-13 00:12:46 +0200 |
---|---|---|
committer | Max Christian Pohle | 2017-06-13 00:12:46 +0200 |
commit | 0ba8d75539ebb419fc4ce09253425069f2f8a2e2 (patch) | |
tree | c4737f39b3a3e37857a42f7dd3c41b62f6274fec /vimrc-full | |
parent | e97e9998136facabc2c6192b7a500a392b8c544a (diff) | |
download | vim-karlmarks-0ba8d75539ebb419fc4ce09253425069f2f8a2e2.tar.bz2 vim-karlmarks-0ba8d75539ebb419fc4ce09253425069f2f8a2e2.zip |
Improved buffer restore behaviour
Diffstat (limited to 'vimrc-full')
-rw-r--r-- | vimrc-full | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -59,7 +59,8 @@ set redrawtime=100 | " The time in milliseconds for redrawing the dis | |||
59 | set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge | 59 | set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge |
60 | set scrolloff=999 | " keeps cursor centered | 60 | set scrolloff=999 | " keeps cursor centered |
61 | set splitbelow | " open new windows below the current one (i find that more intuitive) | 61 | set splitbelow | " open new windows below the current one (i find that more intuitive) |
62 | set shiftround | " indent/unindent snaps to multiple of shiftwidth | 62 | set shiftround | " indent/unindent snaps to multiple of shiftwidths |
63 | set shortmess+=I | " don't give the intro message when starting Vim |:intro|. | ||
63 | set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering) | 64 | set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering) |
64 | set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators | 65 | set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators |
65 | set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always | 66 | set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always |
@@ -603,7 +604,7 @@ if has("autocmd") | |||
603 | augroup END | 604 | augroup END |
604 | endif | 605 | endif |
605 | 606 | ||
606 | autocmd BufNewFile set nobuflisted | 607 | " autocmd BufNewFile set nobuflisted |
607 | " use the shada/viminfo file to return the cursor to where it was... | 608 | " use the shada/viminfo file to return the cursor to where it was... |
608 | function! ReturnCursor() | 609 | function! ReturnCursor() |
609 | if line("'\"") > 1 && line("'\"") <= line("$") | 610 | if line("'\"") > 1 && line("'\"") <= line("$") |
@@ -758,6 +759,11 @@ if version >= 702 " clean up (see: http://vim.wikia.com/wiki/VimTip396) | |||
758 | autocmd BufWinLeave * call clearmatches() | 759 | autocmd BufWinLeave * call clearmatches() |
759 | endif | 760 | endif |
760 | 761 | ||
762 | |||
763 | " avoids openin an empty buffer when restoring bufferlist from viminfo... | ||
764 | if argc() == 0 | ||
765 | autocmd VimEnter * nested :bun | ||
766 | endif | ||
761 | " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main | 767 | " au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main |
762 | " Enable omni completion. | 768 | " Enable omni completion. |
763 | " autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS | 769 | " autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS |