Vimrc explaination


!! : 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

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

Vundle 密技

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

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
:cd %:p:h // change to the directory of the currently open file
just put in .vimrc

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


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

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

Twitter picture

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


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

Google+ photo

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

連結到 %s