aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2017-06-13 00:12:46 +0200
committerMax Christian Pohle2017-06-13 00:12:46 +0200
commit0ba8d75539ebb419fc4ce09253425069f2f8a2e2 (patch)
treec4737f39b3a3e37857a42f7dd3c41b62f6274fec
parente97e9998136facabc2c6192b7a500a392b8c544a (diff)
downloadvim-0ba8d75539ebb419fc4ce09253425069f2f8a2e2.tar.bz2
vim-0ba8d75539ebb419fc4ce09253425069f2f8a2e2.zip
Improved buffer restore behaviour
-rw-r--r--vimrc-full10
-rw-r--r--vimrc-medium1
2 files changed, 9 insertions, 2 deletions
diff --git a/vimrc-full b/vimrc-full
index c72b4ac..225fc4a 100644
--- a/vimrc-full
+++ b/vimrc-full
@@ -59,7 +59,8 @@ set redrawtime=100 | " The time in milliseconds for redrawing the dis
59set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge 59set scrolljump=5 | " how many lines get scrolled into view when cursor reaches the screens edge
60set scrolloff=999 | " keeps cursor centered 60set scrolloff=999 | " keeps cursor centered
61set splitbelow | " open new windows below the current one (i find that more intuitive) 61set splitbelow | " open new windows below the current one (i find that more intuitive)
62set shiftround | " indent/unindent snaps to multiple of shiftwidth 62set shiftround | " indent/unindent snaps to multiple of shiftwidths
63set shortmess+=I | " don't give the intro message when starting Vim |:intro|.
63set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering) 64set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering)
64set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators 65set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators
65set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always 66set 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()
759endif 760endif
760 761
762
763" avoids openin an empty buffer when restoring bufferlist from viminfo...
764if argc() == 0
765 autocmd VimEnter * nested :bun
766endif
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
diff --git a/vimrc-medium b/vimrc-medium
index a066e60..8281ef1 100644
--- a/vimrc-medium
+++ b/vimrc-medium
@@ -65,6 +65,7 @@ set ttyscroll=3
65set ttyfast 65set ttyfast
66set mouse=a 66set mouse=a
67set hidden 67set hidden
68set viminfo+=% | " restore buffer list
68 69
69 70
70" set title 71" set title
..