User Tools

Site Tools


linux:vim

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:vim [2013/10/12 15:53] – [NERDTree] percylinux:vim [2016/08/15 16:25] (current) – [Vim tips] percy
Line 5: Line 5:
 open/close folder open/close folder
   zf/zo   zf/zo
 +   
 +   :%!xxd 
 +   :%!xxd -r
 ===== Split ===== ===== Split =====
   :split filename   :split filename
Line 17: Line 19:
   Ctrl+w:H,J,K,L   Ctrl+w:H,J,K,L
   Ctrl+w:w   Ctrl+w:w
 +
 +==== select ====
 +  v
 +  ctrl+v select a block
  
 ===== Reference ===== ===== Reference =====
Line 45: Line 51:
   git clone https://github.com/scrooloose/nerdtree.git   git clone https://github.com/scrooloose/nerdtree.git
  
-Keyboard Commands+Keyboard Commands(NERDTree 快捷键辑录:http://yang3wei.github.io/blog/2013/01/29/nerdtree-kuai-jie-jian-ji-lu/)
  
 Type :help NERDTreeMappings to read through all of the default keyboard shortcuts. These are the ones I use the most frequently: Type :help NERDTreeMappings to read through all of the default keyboard shortcuts. These are the ones I use the most frequently:
Line 56: Line 62:
 R: Refresh the tree, useful if files change outside of Vim R: Refresh the tree, useful if files change outside of Vim
 ?: Toggle NERD Tree's quick help ?: Toggle NERD Tree's quick help
 +C:change tree root to the selected dir,use "C+t" to open the selected dir in new tab.
 </code> </code>
 +
 +  gt = next tab
 +  gT = previous tab
 ==== Maximum Awesome ==== ==== Maximum Awesome ====
  
 http://corner.squareup.com/2013/08/fly-vim-first-class.html http://corner.squareup.com/2013/08/fly-vim-first-class.html
   git clone https://github.com/square/maximum-awesome.git && cd maximum-awesome && rake   git clone https://github.com/square/maximum-awesome.git && cd maximum-awesome && rake
 +  
 + 
 +==== Maximum Awesome Linux ====
 +  https://github.com/pjq/maximum-awesome-linux
 + ==== paste ====
 +  :set paste
 +  :set nopaste
 +Install the macvim to replace the system vim
 +  brew install macvim --HEAD --override-system-vim
 +  
 +==== ctags ====
 +  sudo port install ctags
 +  ctags -R
 +
 +Append ~/.vimrc
 +  set tags=tags;
 +  set autochdir
 +  
 +==== taglist ====
 +Download the latest taglist from here:
 +http://www.vim.org/scripts/script.php?script_id=273
 +<code>
 +"taglist
 +map <silent> <F8> :TlistToggle<cr>  
 +""""""""""""""""""""""""""""""
 +" Tag list (ctags)
 +""""""""""""""""""""""""""""""
 +let Tlist_Ctags_Cmd = 'ctags'
 +let Tlist_Show_One_File = 1            "不同时显示多个文件的tag,只显示当前文件的
 +let Tlist_Exit_OnlyWindow = 1          "如果taglist窗口是最后一个窗口,则退出vim
 +let Tlist_Use_Right_Window = 1         "在右侧窗口中显示taglist窗口    
 +</code>
 +
 +
 +==== run command ====
 +  !ls
 +  r !ls
 +  
 +  
 +==== Vim tips ====
 +<code>
 +^M is retrieve by cmd+v, M
 +</code>
 +  
 +  1,%s/^M//g
 +
 +
 + 
 +  
 +
/var/www/dokuwiki/wiki/data/attic/linux/vim.1381564392.txt.gz · Last modified: 2016/05/05 13:06 (external edit)