Vim

Vimrc explaination
http://dougblack.io/words/a-good-vimrc.html

Vim: http://statico.github.io/vim.html

http://blog.sanctum.geek.nz/start-vim-with-splits/

http://shensy.iteye.com/blog/1155400

!! : Repeat last command

find  home/ -type d //搜索home下的文件夹

: bufdo tab split

  • bufdo [command] => Apply the [command] to all buffers
  • tab split => Take the current buffer and open a tab with it
  • map ,bt :bufdo tab split<CR> => Mapping the command to “,bt"

Switch between panels: ctrl-w h,j,k,l
Hide panels : hide/unhide
Swap horizontal to vertical panels : ctrl-shift-h,j,k,l

Bind “go build" to “make" in Vim:
set makeprg=go\ build

gcutil ssh –ssh_user=csiuser benchmarker13

Vim script
http://www.douban.com/group/topic/10866937/

http://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/

Show/set leader key
:echo mapleader
:let mapleader=","
:nnoremap <Leader>w :GoDef<CR>

Vundle 密技
https://www.digitalocean.com/community/tutorials/how-to-use-vundle-to-manage-vim-plugins-on-a-linux-vps

Vundle cmd

steps to install a plugin
add it to you .vimrc between call vundle#begin() and call vundle#end()

  1. save the .vimrc
  2. type <ESC>:PluginInstall<CR>

to update the plugins

  1. type <ESC>:PluginInstall!<CR> or <ESC>:PluginUpdate<CR>

to remove a plugin

  1. remove it from the .vimrc
  2. save the .vimrc
  3. type <ESC>:PluginClean<CR>

Pipe all posibble ctags matches to quickfix
:ltag
:lopen

Grep all search occurrences in quickfix
In current file : vimgrep <search_text> %
In subfolder : vimgrep <search_text> ./*
vimgrep <search_text> ./*.ts

Open NerdTree in current open tab/file:
Step 1:
:lcd %:p:h // change the directory only for the current
or
:cd %:p:h // change to the directory of the currently open file
Step2:
NERDTreeCWD
or
just put in .vimrc

autocmd BufEnter * lcd %:p:h
廣告
本篇發表於 Uncategorized 並標籤為 , 。將永久鏈結加入書籤。

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s