Skip to content

Commit 0b347b0

Browse files
committed
k-vim 9.2 release
1 parent e20bac4 commit 0b347b0

File tree

4 files changed

+140
-110
lines changed

4 files changed

+140
-110
lines changed

README.md

+16-34
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
k-vim
22
=======================
33

4-
**Note**: 9.1版本的文档/wiki等, 处理中(原先的常见问题FAQ/插件演示和使用/自定义快捷键等)
54

6-
当前进度30%
5+
> VERSION: 9.2
76
8-
----------------
7+
> LAST_UPDATE_TIME: 2017-07-29
98
10-
> VERSION: 9.1
11-
12-
> LAST_UPDATE_TIME: 2015-12-15
13-
14-
> 本次更新: 大版本更新, 众多细节优化
9+
> 本次更新: 小版本更新, 支持vim8异步愈发检查
1510
1611
详细 [更新日志](https://github.com/wklken/k-vim/wiki/UPDATE_LOG)
1712

@@ -76,9 +71,7 @@ brew install the_silver_searcher
7671
##### 2.2 使用Python
7772

7873
```
79-
sudo pip install pyflakes
80-
sudo pip install pylint
81-
sudo pip install pep8
74+
sudo pip install flake8 yapf
8275
```
8376

8477
##### 2.3 如果使用Javascript(不需要的跳过)
@@ -91,11 +84,13 @@ sudo pip install pep8
9184
sudo apt-get install nodejs npm
9285
sudo npm install -g jslint
9386
sudo npm install jshint -g
87+
sudo npm install -g eslint eslint-plugin-standard eslint-plugin-promise eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-html babel-eslint
9488
9589
# mac
9690
brew install node
9791
npm install jshint -g
9892
npm install jslint -g
93+
npm install -g eslint eslint-plugin-standard eslint-plugin-promise eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-html babel-eslint
9994
```
10095

10196

@@ -256,6 +251,7 @@ ctrl+t 新建一个tab
256251
Y =y$ 复制到行尾
257252
U =Ctrl-r
258253
,sa select all,全选
254+
gv 选中并高亮最后一次插入的内容
259255
,v 选中段落
260256
kj 代替<Esc>,不用到角落去按esc了
261257
@@ -287,32 +283,18 @@ ctrl+n 相对/绝对行号切换
287283

288284
### UPDATE_LOG
289285

290-
version 9.1
286+
version 9.2
291287

292288
```
293289
插件部分:
294-
1. 使用 'junegunn/vim-plug' 替代 'VundleVim/Vundle.vim' 来管理插件, 安装/更新速度更快
295-
2. 支持自定义插件集合, 可以配置自己需要安装的插件
296-
3. 去除tomorrow主题插件 'chriskempson/vim-tomorrow-theme'
297-
4. Javascript插件, 使用 'othree/javascript-libraries-syntax.vim' 替代 'nono/jquery.vim',
298-
5. Javascript插件, 使用 'othree/yajs.vim' 替代 'jelera/vim-javascript-syntax'
299-
6. 去除 minibufferexpl 所有配置(ctrlspace替代)
300-
7. 去除 taglist 所有配置(tagbar和ctrl-funky替代)
301-
8. Python插件, 增加 'hynek/vim-python-pep8-indent'
302-
9. Python插件, 去除 'kevinw/pyflakes-vim'
303-
10. Go插件, 使用 'fatih/vim-go' 替代 'Blackrush/vim-gocode'
304-
11. 快速移动, 增加插件 'unblevable/quick-scope', 按f/F/t/T时触发, 行内快速移动, 与 easymotion 互补
305-
12. (bundle_groups配置了tmux)tmux插件 'christoomey/vim-tmux-navigator'
306-
13. (bundle_groups配置了json)json插件 'elzr/vim-json'
290+
1. 增加 w0rp/ale 异步语法检查插件, 用户vim版本为8.0时自动启用. 非8时, 启用默认scrooloose/syntastic, 两套插件快捷键一致
291+
2. 切换使用flake8作为python风格检查(pip install pep8)
292+
3. 启用yapf作为python代码格式化(pip install yapf)
293+
4. 启用eslint作为javascript代码检查
294+
5. YCM 设置回车选中不再弹补全框
307295
308296
细节:
309-
1. 增加 leader+w 保存文件
310-
2. YCM 开启语法关键字补全 'let g:ycm_seed_identifiers_with_syntax=1'
311-
3. 插件 'terryma/vim-expand-region', 增加自定义每次加减的区域配置
312-
4. 解决在insert mode粘贴代码缩进错乱问题(以前需要:set paste . 即k-vim中F5快捷键, 现在不需要了)
313-
314-
其他:
315-
1. UPDATE_LOG文件迁移到github wiki
297+
1. 新增快捷键 gv 选中并高亮最后一次插入的内容
316298
```
317299

318300
### Contributors
@@ -351,10 +333,10 @@ The End!
351333

352334
wklken (凌岳/pythoner/vim党预备党员)
353335

354-
355-
356336
Github: https://github.com/wklken
357337

358338
Blog: [http://www.wklken.me](http://www.wklken.me)
359339

360340
2013-06-11 于深圳
341+
342+

UltiSnips/all.snippets

+4
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,7 @@ endsnippet
6464
snippet rms
6565
# TODO: remove this
6666
endsnippet
67+
68+
snippet nqa
69+
# noqa
70+
endsnippet

vimrc

+18-31
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
" -> Theme Settings 主题设置
1818
"
1919
" -> 插件配置和具体设置在vimrc.bundles中
20+
" Note: Don't put anything in your .vimrc you don't understand!
2021
"==========================================
2122

2223
"==========================================
@@ -521,6 +522,9 @@ vnoremap <leader>y "+y
521522
" select all
522523
map <Leader>sa ggVG
523524
525+
" 选中并高亮最后一次插入的内容
526+
nnoremap gv `[v`]
527+
524528
" select block
525529
nnoremap <leader>v V`}
526530
@@ -554,8 +558,12 @@ nnoremap ` '
554558
nnoremap U <C-r>
555559
556560
" Quickly edit/reload the vimrc file
557-
nmap <silent> <leader>ev :e $MYVIMRC<CR>
558-
nmap <silent> <leader>sv :so $MYVIMRC<CR>
561+
" nmap <silent> <leader>ev :e $MYVIMRC<CR>
562+
" nmap <silent> <leader>sv :so $MYVIMRC<CR>
563+
" edit vimrc/zshrc and load vimrc bindings
564+
nnoremap <leader>ev :vsp $MYVIMRC<CR>
565+
nnoremap <leader>ez :vsp ~/.zshrc<CR>
566+
nnoremap <leader>sv :source $MYVIMRC<CR>
559567
560568
"==========================================
561569
" FileType Settings 文件类型设置
@@ -566,6 +574,8 @@ autocmd FileType python set tabstop=4 shiftwidth=4 expandtab ai
566574
autocmd FileType ruby,javascript,html,css,xml set tabstop=2 shiftwidth=2 softtabstop=2 expandtab ai
567575
autocmd BufRead,BufNewFile *.md,*.mkd,*.markdown set filetype=markdown.mkd
568576
autocmd BufRead,BufNewFile *.part set filetype=html
577+
autocmd BufRead,BufNewFile *.vue setlocal filetype=vue.html.javascript tabstop=2 shiftwidth=2 softtabstop=2 expandtab ai
578+
569579
" disable showmatch when use > in php
570580
au BufWinEnter *.php set mps-=<:>
571581

@@ -591,8 +601,9 @@ function! AutoSetFileHead()
591601

592602
"如果文件类型为python
593603
if &filetype == 'python'
594-
call setline(1, "\#!/usr/bin/env python")
595-
call append(1, "\# encoding: utf-8")
604+
" call setline(1, "\#!/usr/bin/env python")
605+
" call append(1, "\# encoding: utf-8")
606+
call setline(1, "\# -*- coding: utf-8 -*-")
596607
endif
597608

598609
normal G
@@ -614,28 +625,9 @@ endif
614625
" TEMP 设置, 尚未确定要不要
615626
"==========================================
616627

617-
" tmux
618-
" function! WrapForTmux(s)
619-
" if !exists('$TMUX')
620-
" return a:s
621-
" endif
622-
"
623-
" let tmux_start = "\<Esc>Ptmux;"
624-
" let tmux_end = "\<Esc>\\"
625-
"
626-
" return tmux_start . substitute(a:s, "\<Esc>", "\<Esc>\<Esc>", 'g') . tmux_end
627-
" endfunction
628-
"
629-
" let &t_SI .= WrapForTmux("\<Esc>[?2004h")
630-
" let &t_EI .= WrapForTmux("\<Esc>[?2004l")
631-
632-
" allows cursor change in tmux mode
633-
" let &t_SI = "\<Esc>]50;CursorShape=1\x7"
634-
" let &t_EI = "\<Esc>]50;CursorShape=0\x7"
635-
" if exists('$TMUX')
636-
" let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
637-
" let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
638-
" endif
628+
" beta
629+
" https://dougblack.io/words/a-good-vimrc.html
630+
set lazyredraw " redraw only when we need to.
639631

640632

641633
"==========================================
@@ -667,7 +659,6 @@ set t_Co=256
667659

668660
colorscheme solarized
669661
" colorscheme molokai
670-
" colorscheme desert
671662

672663

673664
" 设置标记一列的背景颜色和数字一行颜色一致
@@ -684,7 +675,3 @@ highlight clear SpellRare
684675
highlight SpellRare term=underline cterm=underline
685676
highlight clear SpellLocal
686677
highlight SpellLocal term=underline cterm=underline
687-
688-
689-
690-

0 commit comments

Comments
 (0)