-
Notifications
You must be signed in to change notification settings - Fork 10
/
init.vim
121 lines (101 loc) · 3.47 KB
/
init.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
" Mosky's init.vim
" ================
"
" Read the comments for the useful keystrokes of the plugins.
"
" It meets the unadorned requirements of Python development, but any feature
" request or bug report is welcome. Send mail to Mosky <mosky.tw@gmail.com>.
"
" use vim-plug to manage plugins, see https://github.com/junegunn/vim-plug#usage
" for details
call plug#begin('~/.config/nvim/plugged/')
" sorted by displaying, moving, selecting, editing, and Mosky's fav
" --- displaying ---
" use % to travel paired tags
runtime macros/matchit.vim
" highlight the matched tag
Plug 'gregsexton/MatchTag'
" " conceal lambda into λ, etc.
" Plug 'ehamberg/vim-cute-python'
" syntax
Plug 'othree/html5.vim'
Plug 'moskytw/nginx-contrib-vim'
Plug 'kchmck/vim-coffee-script'
" --- moving ---
" use % to travel Python's if, elif, etc.
Plug 'vim-scripts/python_match.vim'
" after :map <Leader><Leader> <Plug>(easymotion-prefix)
" <Leader><Leader>w: select a beginning of word to jump
" <Leader><Leader>W: select a beginning of WORD to jump
" <Leader><Leader>f: select a right char to jump
" <Leader><Leader>F: select a left char to jump
" <Leader><Leader>j: select a line downward to jump
" <Leader><Leader>k: select a line forward to jump
" and so on
" <Leader><Leader>n: select a latest / or ? to jump
" <Leader><Leader>N: select a latest / or ? to jump
" <Leader><Leader>s: select a right and left char to jump
" more: :tabnew | h easymotion | only
" or:
" https://github.com/easymotion/vim-easymotion/blob/master/doc/easymotion.txt
Plug 'easymotion/vim-easymotion'
" --- selecting ---
" dIa: f(a, b, c) -> f(a, ,c)
" dia: f(a, b, c) -> f(a,, c)
" daa: f(a, b, c) -> f(a, c)
" dAa: f(a, b, c) -> f(ac)
" more: https://github.com/wellle/targets.vim/blob/master/cheatsheet.md
Plug 'wellle/targets.vim'
" vaI: an indent level + the above & below line -- select a Ruby function
" vai: an indent level + the above line -- select a Python function
" vii: an indent level -- select lines in a Ruby or Python function
Plug 'michaeljsmith/vim-indent-object'
" use +/_ to expand/shrink visual selection
" let g:expand_region_text_objects = {
" \ 'iw' :0,
" \ 'iW' :0,
" \ 'i"' :0,
" \ 'i''' :0,
" \ 'i]' :1, " Support nesting of square brackets
" \ 'ib' :1, " Support nesting of parentheses
" \ 'iB' :1, " Support nesting of braces
" \ 'il' :0, " 'inside line'. Available through https://github.com/kana/vim-textobj-line
" \ 'ip' :0,
" \ 'ie' :0, " 'entire file'. Available through https://github.com/kana/vim-textobj-entire
" \ }
Plug 'terryma/vim-expand-region'
" --- editing ---
" ds" : "word" -> word
" dst : <a>word</a> -> word
" cs'" : 'word' -> "word"
" cst<a> : <p>word</p> -> <a>word</a>
" viwS' : word -> 'word'
" viwS<p>: word -> <p>word</p>
" ysiw' : word -> 'word'
" ysiw<p>: word -> <p>word</p>
" yss for entire line
Plug 'tpope/vim-surround'
" ms-: multiple selection
" enter and exit the ms-visual mode:
"
" <Ctrl-N>: enter with current word or visual selection
" <ESC> : exit
"
" in the ms-visual mode:
"
" <Ctrl-N>: add
" <Ctrl-X>: skip
" <Ctrl-P>: back
" c, s : delete all selections and go ms-insert mode
" v : go normal mode
"
" in the ms-normal mode:
"
" I, i, a, A: move the cursors and go ms-insert mode
"
Plug 'terryma/vim-multiple-cursors'
" --- Mosky's fav ---
" put at the end to override the configs of the above plugins
Plug 'moskytw/luthadel.vim'
Plug 'moskytw/mosky.vim'
call plug#end()