diff --git a/.gitignore b/.gitignore index 66d01465..92da2791 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,5 @@ sources_non_forked/ack.vim/.netrwhist temp_dirs/yankring_history_v2.txt sources_forked/yankring/doc/tags sources_non_forked/tlib/doc/tags -my_configs.vim tags .DS_Store diff --git a/README.md b/README.md index 4d78188f..2819d25f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ + + +# 快捷键总结 +| 快捷键 | 功能 | +|-- |-- | +| | 进入函数或者函数定义处 +| | 返回前一步 + + # The Ultimate vimrc Over the last 8 years I have used and tweaked Vim. This is my Ultimate vimrc. diff --git a/my_configs.vim b/my_configs.vim new file mode 100644 index 00000000..99e1ddfe --- /dev/null +++ b/my_configs.vim @@ -0,0 +1,19 @@ +set nu + +syntax on +set tags=tags; +set autochdir + +"How can I open a NERDTree automatically when vim starts up if no files were specified? +autocmd StdinReadPre * let s:std_in=1 +autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif + +"How can I close vim if the only window left open is a NERDTree? +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif + +nmap be :BufExplorer +nmap nt :NERDTree +nmap tl :Tlist +nmap vs :vsplite + + diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 198daa4b..f0916fbf 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -102,9 +102,9 @@ set hid set backspace=eol,start,indent set whichwrap+=<,>,h,l -" In many terminal emulators the mouse works just fine, thus enable it. +" In many terminal emulators the mouse works just fine, thus enable it. modified by YN if has('mouse') - set mouse=a + set mouse= "a endif " Ignore case when searching @@ -261,13 +261,13 @@ try catch endtry -" Return to last edit position when opening files (You want this!) -" autocmd BufReadPost * -" \ if line("'\"") > 0 && line("'\"") <= line("$") | -" \ exe "normal! g`\"" | -" \ endif +" Return to last edit position when opening files (You want this!) modified by YN + autocmd BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif " Remember info about open buffers on close -" set viminfo^=% +set viminfo^=% """"""""""""""""""""""""""""""