Skip to content

Commit

Permalink
change nerdtree v/s to open file in split window
Browse files Browse the repository at this point in the history
  • Loading branch information
wklken committed Oct 3, 2014
1 parent c48e5f7 commit 130560b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ molokai主题
9. 去掉错误输入提示
10. 交换`和', '能跳转到准确行列位置
11. python/ruby 等, 保存时自动去行尾空白
12. 统一所有分屏打开的操作位v/s[nerdtree/ctrlspace] (特殊ctrlp ctrl+v/x)

废弃:
t 新起一行,下面,不进入插入模式
Expand Down Expand Up @@ -433,20 +434,27 @@ molokai主题

3. ####快速编辑 [tpope/vim-surround](https://github.com/tpope/vim-surround) +[tpope/vim-repeat](https://github.com/tpope/vim-repeat)

必装,很给力的功能,快速给词加环绕符号,例如引号
必装,很给力的功能,快速给词加环绕符号,例如引号, 注意(括号, 左括号会加空格, 右括号不会)

repeat进行增强,'.'可以重复命令
repeat进行增强,'.'可以重复使用命令

[d]
cs"' [inside]
cs"'
"Hello world!" -> 'Hello world!'

ds"
"Hello world!" -> Hello world!

ysiw"
Hello -> "Hello"

yss"
Hello world -> "Hello world"

cst"
<a>abc</a> -> "abc"


演示

![surround](https://github.com/wklken/gallery/blob/master/vim/surround.gif?raw=true)
Expand Down Expand Up @@ -582,7 +590,7 @@ molokai主题
[sd] ,f 相当于mru功能,show recently opened files

ctrl + j/k 进行上下移动
ctrl + x/v 分屏打开该文件
ctrl + x/v 分屏打开该文件 [重要**]
ctrl + t 在新tab中打开该文件

演示
Expand Down Expand Up @@ -678,8 +686,10 @@ molokai主题
J.......最后一个节点

o.......Open files, directories and bookmarks
i.......split上下分屏
s.......vsplit左右分屏

s.......split上下分屏[原来是i, 改键]
v.......vsplit左右分屏[原来是s, 改键]

c.......将当前目录设为根节点
q.......关闭

Expand Down
5 changes: 5 additions & 0 deletions vimrc.bundles
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ let g:ctrlp_match_window_reversed=0
let g:ctrlp_mruf_max=500
let g:ctrlp_follow_symlinks=1


" ctrlp插件1 - 不用ctag进行函数快速跳转
Bundle 'tacahiroy/ctrlp-funky'
nnoremap <Leader>fu :CtrlPFunky<Cr>
Expand Down Expand Up @@ -314,6 +315,10 @@ let NERDTreeIgnore=[ '\.pyc$', '\.pyo$', '\.obj$', '\.o$', '\.so$', '\.egg$', '^
"let g:netrw_home='~/bak'
"close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | end
" s/v 分屏打开文件
let g:NERDTreeMapOpenSplit = 's'
let g:NERDTreeMapOpenVSplit = 'v'


Bundle 'jistr/vim-nerdtree-tabs'
map <Leader>n <plug>NERDTreeTabsToggle<CR>
Expand Down

0 comments on commit 130560b

Please sign in to comment.