Skip to content

Commit

Permalink
新增插件 godlygeek/tabular 用于代码对齐
Browse files Browse the repository at this point in the history
  • Loading branch information
wklken committed May 10, 2014
1 parent ba1220a commit 613e4ec
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 103 deletions.
181 changes: 82 additions & 99 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,10 @@ molokai主题

![delimitmate](https://github.com/wklken/gallery/blob/master/vim/delimate.gif?raw=true)

附:同类插件 [kana/vim-smartinput](https://github.com/kana/vim-smartinput)

5. ####html/xml标签配对补全 [docunext/closetag.vim]()

5. ####html/xml标签配对补全 [docunext/closetag.vim](https://github.com/docunext/closetag.vim)


> 快速编码
Expand All @@ -403,6 +405,9 @@ molokai主题
![nerdcommenter](https://github.com/wklken/gallery/blob/master/vim/nerdcomment.gif?raw=true)


附:注释还有其他两种插件可选[tcomment](https://github.com/tomtom/tcomment_vim)[tpope/vim-commentary](https://github.com/tpope/vim-commentary)


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

必装,很给力的功能,快速给词加环绕符号,例如引号
Expand All @@ -428,6 +433,14 @@ molokai主题

[sd] ,空格 去掉当前行末尾空格

4. ####赋值语句代码对齐 [godlygeek/tabular](https://github.com/godlygeek/tabular)

将代码,或者json等,进行对齐,具体见 [tabular-vim](http://vimcasts.org/episodes/aligning-text-with-tabular-vim/)

[sd] 可以选中多行,不选中默认操作当前行
,a= 对齐等号表达式
,a: 对齐冒号表达式(json/map等)

> 快速移动
1. ####位置跳转[Lokaltog/vim-easymotion](https://github.com/Lokaltog/vim-easymotion)
Expand Down Expand Up @@ -527,6 +540,8 @@ molokai主题
[sd] ,f 相当于mru功能,show recently opened files

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

演示

Expand Down Expand Up @@ -568,6 +583,8 @@ molokai主题

[sd] ,h 查看文件编辑历史

附:同类插件 [mbbill/undotree](https://github.com/mbbill/undotree)

> 显示增强

Expand Down Expand Up @@ -607,16 +624,23 @@ molokai主题
,n 打开 关闭树形目录结构

在nerdtree窗口常用操作:(小写当前,大写root)
x.......Close the current nodes parent收起当前目录树
R.......Recursively refresh the current root刷新根目录树
r.......Recursively refresh the current directory刷新当前目录
P.......Jump to the root node
p.......Jump to current nodes parent
K.......Jump up inside directories at the current tree depth 到同目录第一个节点
J.......Jump down inside directories at the current tree depth 最后一个节点
x.......收起当前目录树
X.......递归收起当前目录树
r.......刷新当前目录
R.......刷新根目录树

p.......跳到当前节点的父节点
P.......跳到root节点
k/j.....上下移动
K.......到同目录第一个节点
J.......最后一个节点

o.......Open files, directories and bookmarks
i.......Open selected file in a split window上下分屏
s.......Open selected file in a new vsplit左右分屏
i.......split上下分屏
s.......vsplit左右分屏
c.......将当前目录设为根节点
q.......关闭


演示

Expand Down Expand Up @@ -666,43 +690,36 @@ molokai主题

2. ####Golang

Go语言自动补全[Blackrush/vim-gocode]()
Go语言自动补全[Blackrush/vim-gocode](https://github.com/Blackrush/vim-gocode)

3. ####Markdown
安装gocode之后 ,配置这个插件

[plasticboy/vim-markdown](https://github.com/plasticboy/vim-markdown)

markdown语法,编辑md文件

4. ####HTML/JS/JQUERY/CSS
`which gocode` (add $GOPATH/bin to you $PATH)

[pangloss/vim-javascript](https://github.com/pangloss/vim-javascript)
另一个插件[觉得太过庞大没有使用,golang开发者可以配置试用下] [fatih/vim-go](https://github.com/fatih/vim-go) [介绍](http://blog.gopheracademy.com/vimgo-development-environment)

偶尔会看看js,频率不高

[maksimr/vim-jsbeautify](https://github.com/maksimr/vim-jsbeautify) 未配置

js/html/css 格式化
3. ####Markdown

[nono/jquery.vim](https://github.com/nono/jquery.vim)
[plasticboy/vim-markdown](https://github.com/plasticboy/vim-markdown)

jquery高亮
markdown语法,编辑md文件

[elzr/vim-json](https://github.com/elzr/vim-json)
4. ####HTML/JS/JQUERY/CSS

json高亮,未配置
[pangloss/vim-javascript](https://github.com/pangloss/vim-javascript) 偶尔会看看js,频率不高

[kchmck/vim-coffee-script](https://github.com/kchmck/vim-coffee-script)
[maksimr/vim-jsbeautify](https://github.com/maksimr/vim-jsbeautify) js/html/css 格式化, 未配置

coffeescript,未配置
[nono/jquery.vim](https://github.com/nono/jquery.vim) jquery高亮

[groenewege/vim-less](https://github.com/groenewege/vim-less)
[elzr/vim-json](https://github.com/elzr/vim-json) json高亮,未配置

less,未配置
[kchmck/vim-coffee-script](https://github.com/kchmck/vim-coffee-script) coffeescript,未配置

[emmet](https://github.com/mattn/emmet-vim)
[groenewege/vim-less](https://github.com/groenewege/vim-less) less,未配置

zencoding,未配置
[emmet](https://github.com/mattn/emmet-vim) zencoding,未配置

[gorodinskiy/vim-coloresque](https://github.com/gorodinskiy/vim-coloresque) 配置 |
[vim-css-color](https://github.com/ap/vim-css-color) 未配置
Expand All @@ -716,43 +733,52 @@ molokai主题

6. ####Ruby

[tpope/vim-rails](https://github.com/tpope/vim-rails)
未配置
可以参考tpope的插件列表,很多跟ruby相关

[tpope/vim-rails](https://github.com/tpope/vim-rails) 未配置
[tpope/vim-endwise](https://github.com/tpope/vim-endwise) 未配置,自动加end

7. ####PHP

[spf13/PIV](https://github.com/spf13/PIV)
未配置
[spf13/PIV](https://github.com/spf13/PIV) 未配置

[arnaud-lb/vim-php-namespace](https://github.com/arnaud-lb/vim-php-namespace)
未配置
[arnaud-lb/vim-php-namespace](https://github.com/arnaud-lb/vim-php-namespace) 未配置

8. ####非语言语法高亮

[evanmiller/nginx-vim-syntax](https://github.com/evanmiller/nginx-vim-syntax)
nginx
[evanmiller/nginx-vim-syntax](https://github.com/evanmiller/nginx-vim-syntax) 未配置

> 其他
1. ####平滑滚动

[terryma/vim-smooth-scroll](https://github.com/terryma/vim-smooth-scroll)
未配置
[yonchu/accelerated-smooth-scroll](https://github.com/yonchu/accelerated-smooth-scroll) 未配置

[terryma/vim-smooth-scroll](https://github.com/terryma/vim-smooth-scroll) 未配置

2. ####多人协作,结对编程

[FredKSchott/CoVim](https://github.com/FredKSchott/CoVim)
未配置
[FredKSchott/CoVim](https://github.com/FredKSchott/CoVim) 未配置

3. ####单行多行变换

[AndrewRadev/splitjoin.vim](https://github.com/AndrewRadev/splitjoin.vim)
未配置
[AndrewRadev/splitjoin.vim](https://github.com/AndrewRadev/splitjoin.vim) 未配置

4. ####TODO关键字列表

[vim-scripts/TaskList.vim](https://github.com/vim-scripts/TaskList.vim)
未配置
[vim-scripts/TaskList.vim](https://github.com/vim-scripts/TaskList.vim) 未配置

5. ####substitute替换增强

[tpope/vim-abolish.vim](https://github.com/tpope/vim-abolish) 未配置

6. ####剪贴板复用增强

[vim-scripts/YankRing.vim](https://github.com/vim-scripts/YankRing.vim) 未配置

7. ####写作模式

[junegunn/goyo.vim](https://github.com/junegunn/goyo.vim) 未配置

---------------------------------

Expand Down Expand Up @@ -781,57 +807,14 @@ molokai主题

TODO:

1.
Taglist有没有必要存在?

2.
增加一些语言类的插件配置

3.
代码格式化
https://github.com/godlygeek/tabular

4.
代码缩进展示-准备加入
https://github.com/nathanaelkane/vim-indent-guides

5.
非paste模式下
黏贴的时候,不要自动补全加括号

6.
比较
kana/vim-smartinput 和delimate
gundo 和 mbbill/undotree [spf13]
powerline和'bling/vim-airline' [spf13]

7.
剪贴板共享-准备加入
https://github.com/vim-scripts/YankRing.vim

8.
待使用确认

tpope Bundle 'tpope/vim-bundler'
Bundle 'tpope/vim-cucumber'
Bundle 'tpope/vim-endwise'
Bundle 'tpope/vim-pastie'
Bundle 'tpope/vim-ragtag'
Bundle 'tpope/vim-rails'
Bundle 'tpope/vim-vividchalk'
tpope/vim-sensible

writing room https://github.com/junegunn/goyo.vim & https://github.com/amix/vim-zenroom2
python-imports.vim

easybuffer.vim
easybuffer.vim - vim plugin to quickly switch between buffers

"showmarks
Bundle 'vim-scripts/ShowMarks'
"markbrowser
Bundle 'vim-scripts/Marks-Browser'

1.更便捷易用的buffer/tab/window管理切换
2.在 vim 中执行shell
https://github.com/Shougo/vimshell.vim
http://code.hootsuite.com/vimshell/
https://github.com/vim-scripts/Conque-Shell
3.vim compile/run/debug code[好奇而已.....目前习惯用终端]
https://github.com/jaredly/vim-debug/
4.现有插件-二八原则对具体用法仔细梳理

### Inspire

Expand Down
22 changes: 18 additions & 4 deletions vimrc.bundles
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,14 @@ au FileType python let b:delimitMate_nesting_quotes = ['"']
Bundle 'docunext/closetag.vim'
let g:closetag_html_style=1



"################### 快速编码 ###################

" 快速注释
Bundle 'scrooloose/nerdcommenter'


" 快速加入修改环绕字符
Bundle 'tpope/vim-surround'
" for repeat -> enhance surround.vim, . to repeat command
Expand All @@ -93,6 +96,17 @@ Bundle 'tpope/vim-repeat'
Bundle 'bronson/vim-trailing-whitespace'
map <leader><space> :FixWhitespace<cr>

" 快速赋值语句对齐
Bundle 'godlygeek/tabular'
nmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a= :Tabularize /=<CR>
" :号也对齐
nmap <Leader>a: :Tabularize /:<CR>
vmap <Leader>a: :Tabularize /:<CR>
" :号不变
"nmap <Leader>a: :Tabularize /:\zs<CR>
"vmap <Leader>a: :Tabularize /:\zs<CR>

"################### 快速移动 ###################

"更高效的移动 [,, + w/fx]
Expand Down Expand Up @@ -185,7 +199,7 @@ nnoremap <leader>h :GundoToggle<CR>
"################### 显示增强 ###################

"状态栏增强展示
" 老的poerline配置
" 老的powerline配置
"Bundle 'Lokaltog/vim-powerline'
"if want to use fancy,need to add font patch -> git clone git://gist.github.com/1630581.git ~/.fonts/ttf-dejavu-powerline
"let g:Powerline_symbols = 'fancy'
Expand Down Expand Up @@ -394,13 +408,13 @@ Bundle 'nono/jquery.vim'
Bundle 'Glench/Vim-Jinja2-Syntax'

"for css color
"Bundle 'ap/vim-css-color'
"not work in iterm2 which termianl selection is not xterm-256
"Bundle 'ap/vim-css-color'

Bundle 'gorodinskiy/vim-coloresque'

"###### nginx #########
"Bundle 'evanmiller/nginx-vim-syntax'




"------------------------------------------- end of configs --------------------------------------------

0 comments on commit 613e4ec

Please sign in to comment.