I am a new vim user, and I don't know why but my first buffer (the [No Name] buffer) is not empty each time I open it, still after rebooting my computer.

It begins with :q! then the end of my .vimrc file.

And when I open a file with vim from the command line it says before :

"client.c" "client.c" 58L, 1558C 
Press ENTER or type command to continue

And then a buffer with the file content preceded by the same text as when I open vim without opening a file, like described before.

I may have done something wrong but I don't know what and I haven't found any information about how to change the default buffer.

Edit: The text begins by :

 " Add plugins to &runtimepath¬
 call plug#end()¬
 " Syntastic¬
 set statusline+=%#warningmsg#¬
 set statusline+=%{SyntasticStatuslineFlag()}¬
 set statusline+=%*¬
 let g:syntastic_always_populate_loc_list = 1¬
 let g:syntastic_auto_loc_list = 1¬
 let g:syntastic_check_on_open = 1¬
 let g:syntastic_check_on_wq = 0¬
 " Window navigation with Control¬
 nnoremap <C-h> <C-w>h¬
 nnoremap <C-j> <C-w>j¬
 nnoremap <C-k> <C-w>k¬
 nnoremap <C-l> <C-w>l¬
 " Tab navigation¬
nnoremap th  :tabfirst<CR>¬  
nnoremap tj  :tabnext<CR>¬
nnoremap tk  :tabprev<CR>¬
nnoremap tl  :tablast<CR>¬
nnoremap tt  :tabedit<Space>¬
nnoremap tm  :tabm<Space>¬
nnoremap td  :tabclose<CR>¬
nnoremap tn :tabnew<CR>¬
nnoremap to :tabonly<CR>¬
nnoremap ts :tab split<CR>¬
  • 1
    Could you post a few lines from your vimrc, the lines just before the part from your vimrc that shows up in the buffers?
    – jjaderberg
    Commented Jan 29, 2016 at 20:39
  • I've updated the post. You can see the :q! followed by the end part of my .vimrc. Commented Jan 29, 2016 at 21:10
  • Great, but I was looking for the lines just before the part that shows up :) My guess is that you do something in your vimrc that causes it to stop processing the lines as ex commands and instead input it as text into whatever first buffer you are loading. Maybe you can add five lines to the top, or even share your whole vimrc if it is not too large?
    – jjaderberg
    Commented Jan 29, 2016 at 21:20
  • I don't suppose you have a literal :q! in your vimrc?
    – jjaderberg
    Commented Jan 29, 2016 at 21:21
  • 1
    No problem :) happy vimming
    – jjaderberg
    Commented Jan 29, 2016 at 21:29

2 Answers 2


Some of the lines of your vimrc are input as text into whatever buffer you are loading. It looks like there is something happening in your vimrc which stops the lines being processed as ex commands and instead are input as text into the buffer. Look at the lines in your vimrc just at that break point and you may find the culprit.

Do you by any chance have a literal :q! in there?


If the vimrc contains errors like literal


it will print the rest of the file in the first buffer, and also at the beginning of files opened.

So be sure to check your vimrc from errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.