From dedee48ac37e518ae4161546a740f8b137ce415c Mon Sep 17 00:00:00 2001 From: labrick Date: Tue, 17 Nov 2015 19:24:46 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=89=93=E5=BC=80265=E8=A1=8C=E7=9A=84?= =?UTF-8?q?=E8=AE=B0=E4=BD=8F=E4=B8=8A=E6=AC=A1=E9=80=80=E5=87=BA=E6=97=B6?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vimrcs/basic.vim | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index f81f3e13..29a92337 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -104,7 +104,7 @@ set whichwrap+=<,>,h,l " In many terminal emulators the mouse works just fine, thus enable it. 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!) opened by YN + autocmd BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif " Remember info about open buffers on close -" set viminfo^=% + set viminfo^=% """""""""""""""""""""""""""""" From 7443e17a5fb4252b605ab0cfe7de8fa819fe09e2 Mon Sep 17 00:00:00 2001 From: labrick Date: Tue, 17 Nov 2015 19:30:17 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=8F=96=E5=87=BA.gitignore=E4=B8=AD?= =?UTF-8?q?=E7=9A=84my=5Fconfigs.vim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - 1 file changed, 1 deletion(-) 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 From f90e49709e3525b4517f8815008e56ce000c97be Mon Sep 17 00:00:00 2001 From: labrick Date: Tue, 17 Nov 2015 19:30:45 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E5=AE=9A=E5=88=B6=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- my_configs.vim | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 my_configs.vim diff --git a/my_configs.vim b/my_configs.vim new file mode 100644 index 00000000..300eb96e --- /dev/null +++ b/my_configs.vim @@ -0,0 +1,5 @@ +set nu + +let Tlist_Auto_Open=1 +set tags=tags; +set autochdir; From 83ecaa2e35204cb0ac2f60ee5ee213b3fb46f858 Mon Sep 17 00:00:00 2001 From: labrick Date: Fri, 27 Nov 2015 13:08:36 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=8E=89=E5=AF=B9mouse?= =?UTF-8?q?=E7=9A=84=E8=AE=BE=E7=BD=AE=EF=BC=8C=E5=B9=B6=E4=B8=94=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=89=93=E5=BC=80=E6=96=87=E4=BB=B6=E6=97=B6=E5=9B=9E?= =?UTF-8?q?=E5=88=B0=E4=B8=8A=E6=AC=A1=E5=85=B3=E9=97=AD=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vimrcs/basic.vim | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 29a92337..2243d2d8 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!) opened by YN +" 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 + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif " Remember info about open buffers on close - set viminfo^=% +set viminfo^=% """""""""""""""""""""""""""""" From 6c576a1294f2f8d52872f9af86ae203d80ef3439 Mon Sep 17 00:00:00 2001 From: labrick Date: Fri, 27 Nov 2015 13:10:03 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E7=9A=84=E5=BF=AB=E6=8D=B7=E9=94=AE=E6=98=A0=E5=B0=84=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=EF=BC=8C=E8=AE=BE=E7=BD=AENERDTree=E7=9A=84=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=89=93=E5=BC=80=E4=B8=8E=E8=87=AA=E5=8A=A8=E5=85=B3?= =?UTF-8?q?=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- my_configs.vim | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/my_configs.vim b/my_configs.vim index 300eb96e..517e65b1 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -1,5 +1,16 @@ set nu -let Tlist_Auto_Open=1 +syntax on set tags=tags; -set autochdir; +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 From 2266afc7d79df6b76931b78fe97f27267b884a92 Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Wed, 27 Jan 2016 23:15:43 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0vsplite=E5=9E=82=E7=9B=B4?= =?UTF-8?q?=E5=88=86=E5=89=B2=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- my_configs.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/my_configs.vim b/my_configs.vim index 517e65b1..99e1ddfe 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -14,3 +14,6 @@ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTree nmap be :BufExplorer nmap nt :NERDTree nmap tl :Tlist +nmap vs :vsplite + + From 5afc436d230befff1b752301bc48a52d890883c1 Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Wed, 27 Jan 2016 23:16:00 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) 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.