मुझे पता है कि करीब बफर है :bd
, लेकिन कभी-कभी मैं बहुत सारी फाइलें खोलता हूं (NERDTree या ctrl+p
) और मैं इस आदेश का उपयोग करता हूं और फिर अपनी विम छोड़ देता हूं। लेकिन कभी-कभी मैं उपयोग करता हूं :q
, यह सिर्फ मेरे बफर बंद है। मुझे नहीं पता क्यों? मैं थोड़ा कन्फ्यूज हो जाता हूं।
मुझे लगता है कि समस्या है .vimrc
, सही है?
मेरे .vimrc
" Note: Skip initialization for vim-tiny or vim-small.
if 0 | endif
if has('vim_starting')
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
" Required:
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" My Bundles here:
" Refer to |:NeoBundle-examples|.
" Note: You don't set neobundle setting in .gvimrc!
" plugin
NeoBundle 'scrooloose/nerdtree'
NeoBundle 'jistr/vim-nerdtree-tabs'
NeoBundle 'kien/ctrlp.vim'
NeoBundle 'bling/vim-airline'
NeoBundle 'Lokaltog/vim-powerline'
NeoBundle 'altercation/vim-colors-solarized'
NeoBundle 'Yggdroot/indentLine' " Line
NeoBundle 'tpope/vim-surround'
NeoBundle 'taglist.vim'
NeoBundle 'shawncplus/phpcomplete.vim'
NeoBundle 'Valloric/YouCompleteMe'
NeoBundle 'airblade/vim-gitgutter'
NeoBundle 'tpope/vim-surround'
NeoBundle 'tpope/vim-rails'
NeoBundle 'easymotion/vim-easymotion'
NeoBundle 'mattn/emmet-vim'
NeoBundle 'terryma/vim-multiple-cursors'
NeoBundle 'haya14busa/incsearch.vim'
NeoBundle 'jiangmiao/auto-pairs'
NeoBundle 'breuckelen/vim-resize'
NeoBundle 'justincampbell/vim-eighties'
NeoBundle 'dkprice/vim-easygrep'
" fix powerline arrow
let g:airline_powerline_fonts = 1
let g:Powerline_symbols = 'fancy'
" airline setting
let g:airline#extensions#tabline#enabled = 1
set laststatus=2
" set left separator
let g:airline#extensions#tabline#left_sep = ' '
" set left separator which are not editting
let g:airline#extensions#tabline#left_alt_sep = '|'
" show buffer number
let g:airline#extensions#tabline#buffer_nr_show = 1
" theme
se t_Co=16
let g:solarized_termcolors=256
syntax enable
set background=dark
colorscheme solarized
" line
let g:indentLine_color_term = 239
" none X terminal
let g:indentLine_color_tty_light = 7 " (default: 4)
let g:indentLine_color_dark = 1 " (default: 2)
set number
set relativenumber
:hi LineNr cterm=bold ctermfg=White ctermbg=LightGreen
set ai
set cursorline
set cursorcolumn
set enc=utf8
set expandtab
set tabstop=4
set shiftwidth=4
" NERDTree map
map <leader>kb :NERDTreeToggle<CR>
let NERDTreeWinPos="left"
" Taglist
map <f9> :Tlist<CR>
let Tlist_Use_Right_Window = 1
let Tlist_Exit_OnlyWindow = 1
set cursorline
highlight CursorLine cterm=underline ctermfg=NONE ctermbg=NONE
" backspace
set backspace=2
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif
set autoindent
" vim-multiple-cursors
let g:multi_cursor_next_key='<C-d>'
let g:multi_cursor_prev_key='<C-p>'
let g:multi_cursor_skip_key='<C-x>'
let g:multi_cursor_quit_key='<Esc>'
" ------ star -----
let mapleader = "\\"
:nnoremap <leader>ev :vsplit $MYVIMRC<cr>
:nnoremap <leader>sv :source $MYVIMRC<cr>
" Ctrl + l visual line
:nnoremap <c-l> V<CR>
:inoremap <c-l> <c-c>V<CR>
:inoremap <c-d> <c-c>ddi
:nnoremap <leader>" viw<esc>a"<esc>hbi"<esc>lel
:nnoremap <leader>' viw<esc>a'<esc>hbi'<esc>lel
:inoremap jk <c-c>
:nnoremap <leader>d bve
:inoremap <leader>d <c-c>bve
:nnoremap <leader>w :w<CR>:echo "saved"<CR>
:inoremap <leader>w <c-c>:wi<CR>
:nnoremap <leader>wq :wq<CR>:echo "saved"<CR>
:inoremap <leader>wq <c-c>:wq<CR>
" Tab
:nnoremap <leader>n :bnext<CR>
:nnoremap <leader>p :bprevious<CR>
:nnoremap <leader>bd :bdelete<CR>
" page down
:nnoremap <leader>f <c-f>
" page up
:nnoremap <leader>b <c-b>
autocmd BufWritePre * :%s/\s\+$//e
set hlsearch
:nnoremap <leader>] <c-]>
:nnoremap <leader>t <c-t>
" emmet
let g:user_emmet_mode='a'
set mouse=nicr
" copy to clipboard
map <leader>c "*y<CR>
" ------ end -------
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
:q
मेरी विम छोड़ो, कभी-कभी यह वर्तमान विंडो को बंद कर देता है।