Skip to content

Commit 3c31aa7

Browse files
author
wklken
committed
easymotion 增加hjkl快速跳转
1 parent 130560b commit 3c31aa7

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,16 @@ molokai主题
486486

487487
必装,效率提升杀手锏,跳转到光标后任意位置
488488

489+
easymothion主要用于快速查找跳转, 今天看了支持jk快速跳转(支持多字母搜索跳转不过我认为太重了)
490+
489491
配置(我的leader键配置 let g:mapleader = ',')
490492

491493
,, + w 跳转
492494
,, + fe 查找'e',快速跳转定位到某个字符位置
495+
,,j 快速决定移动到下面哪行(比用行号/j移动快)
496+
,,k 快速移动到上面哪行
497+
,,l 本行, 向后快速移动
498+
,,h 本行, 向前快速移动
493499

494500
演示
495501

@@ -893,6 +899,9 @@ version: 8.0
893899

894900
11. 重写README
895901

902+
12. easymothion
903+
增加快速hjkl移动快捷键
904+
896905

897906

898907
### Contributors

UPDATE_LOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ version: 8.0
4343

4444
11. 重写README
4545

46+
12. easymothion
47+
增加快速hjkl移动快捷键
4648

4749
## 2014-05-07/08
4850

vimrc.bundles

+27
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ let g:easy_align_delimiters['#'] = { 'pattern': '#', 'ignore_groups': ['String']
153153

154154
"更高效的移动 [,, + w/fx]
155155
Bundle 'Lokaltog/vim-easymotion'
156+
let g:EasyMotion_smartcase = 1
157+
" let g:EasyMotion_startofline = 0 " keep cursor colum when JK motion
158+
map <Leader><leader>h <Plug>(easymotion-linebackward)
159+
map <Leader><Leader>j <Plug>(easymotion-j)
160+
map <Leader><Leader>k <Plug>(easymotion-k)
161+
map <Leader><leader>l <Plug>(easymotion-lineforward)
156162

157163
Bundle 'vim-scripts/matchit.zip'
158164

@@ -224,6 +230,13 @@ let g:ctrlp_extensions = ['funky']
224230
Bundle 'tpope/vim-fugitive'
225231
":Gdiff :Gstatus :Gvsplit
226232
nnoremap <leader>ge :Gdiff<CR>
233+
" not ready to open
234+
" <leader>gb maps to :Gblame<CR>
235+
" <leader>gs maps to :Gstatus<CR>
236+
" <leader>gd maps to :Gdiff<CR> 和现有冲突
237+
" <leader>gl maps to :Glog<CR>
238+
" <leader>gc maps to :Gcommit<CR>
239+
" <leader>gp maps to :Git push<CR>
227240

228241
" 同git diff,实时展示文件中修改的行
229242
" 只是不喜欢除了行号多一列, 默认关闭,gs时打开
@@ -360,6 +373,18 @@ Bundle 'majutsushi/tagbar'
360373
nmap <F9> :TagbarToggle<CR>
361374
let g:tagbar_autofocus = 1
362375

376+
" for ruby
377+
let g:tagbar_type_ruby = {
378+
\ 'kinds' : [
379+
\ 'm:modules',
380+
\ 'c:classes',
381+
\ 'd:describes',
382+
\ 'C:contexts',
383+
\ 'f:methods',
384+
\ 'F:singleton methods'
385+
\ ]
386+
\ }
387+
363388
" go语言的tagbar配置
364389
" 1.install gotags 'go get -u github.com/jstemmer/gotags'
365390
" 2.make sure `gotags` in you shell PATH, you can call check it with `which gotags`
@@ -392,6 +417,8 @@ let g:tagbar_type_go = {
392417
\ 'ctagsargs' : '-sort -silent'
393418
\ }
394419

420+
421+
395422
" 去除taglist =>原因: 使用tagbar和ctrlp-funky可以直接快速跳转函数和变量位置,taglist有些多余
396423

397424
"################### 语言相关 ###################

0 commit comments

Comments
 (0)