1
0
mirror of https://github.com/amix/vimrc synced 2025-02-28 14:12:51 +08:00
This commit is contained in:
LarryBrick 2016-01-27 15:30:30 +00:00
commit e506e23b28
4 changed files with 36 additions and 9 deletions

1
.gitignore vendored
View File

@ -3,6 +3,5 @@ sources_non_forked/ack.vim/.netrwhist
temp_dirs/yankring_history_v2.txt temp_dirs/yankring_history_v2.txt
sources_forked/yankring/doc/tags sources_forked/yankring/doc/tags
sources_non_forked/tlib/doc/tags sources_non_forked/tlib/doc/tags
my_configs.vim
tags tags
.DS_Store .DS_Store

View File

@ -1,3 +1,12 @@
# 快捷键总结
| 快捷键 | 功能 |
|-- |-- |
| <Ctrl-]> | 进入函数或者函数定义处
| <Ctrl-o> | 返回<Ctrl-]>前一步
# The Ultimate vimrc # The Ultimate vimrc
Over the last 8 years I have used and tweaked Vim. This is my Ultimate vimrc. Over the last 8 years I have used and tweaked Vim. This is my Ultimate vimrc.

19
my_configs.vim Normal file
View File

@ -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<CR>
nmap nt :NERDTree<CR>
nmap tl :Tlist<CR>
nmap vs :vsplite<CR>

View File

@ -102,9 +102,9 @@ set hid
set backspace=eol,start,indent set backspace=eol,start,indent
set whichwrap+=<,>,h,l 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') if has('mouse')
set mouse=a set mouse= "a
endif endif
" Ignore case when searching " Ignore case when searching
@ -261,13 +261,13 @@ try
catch catch
endtry endtry
" Return to last edit position when opening files (You want this!) " Return to last edit position when opening files (You want this!) modified by YN
" autocmd BufReadPost * autocmd BufReadPost *
" \ if line("'\"") > 0 && line("'\"") <= line("$") | \ if line("'\"") > 0 && line("'\"") <= line("$") |
" \ exe "normal! g`\"" | \ exe "normal! g`\"" |
" \ endif \ endif
" Remember info about open buffers on close " Remember info about open buffers on close
" set viminfo^=% set viminfo^=%
"""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""