forked from rstacruz/vimfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NOTES.txt
270 lines (183 loc) · 5.82 KB
/
NOTES.txt
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
------------------------------------------------------------------------------
*Shougo/unite*
`,ua` all files (or CTRL-p)
`,ub` buffer
`,ut` tag
`,ug` git ls-files
`,uo` outline (or `,t`)
|:Unite| open unite
------------------------------------------------------------------------------
*tpope/vim-vinegar*
|-| back
|.| open in command line
|!| open in command line
|D| delete
|d| mkdir
|R| rename
|%| new file
|o| open in horiz split
|v| open in vert split
|t| open in tab
|^O| back to editing
|i| change view (tree!)
|mf| mark file
|mm| move here
------------------------------------------------------------------------------
*scrooloose/nerdtree*
|,N| open tree
|o| open
|i| open in split
|t| open in tab
|T| open in tab, silently
------------------------------------------------------------------------------
*splitjoin*
Multiple lines into single lines (and vice versa).
|gS| expand to multiple lines
|gJ| collapse
Example:
>
<div>xxx</div>
<div>
xxx
</div>
------------------------------------------------------------------------------
*kchmck/vim-coffee-script*
|,C| preview compiled form (|:CoffeeWatch|)
------------------------------------------------------------------------------
*junegunn/vim-easy-align*
{Visual}<Enter> activate
ga{motion} activate for motion/text object
------------------------------------------------------------------------------
*vimr.app*
`cmd-shift-o` fuzzy find
`cmd-1/0` sidebar show/hide
------------------------------------------------------------------------------
*mileszs/ack.vim*
Search through files
>
:Ack searchterm
<
`go` preview
`o` open file
`O` open file and close ack list
`t` open in tab
`T` open in tab, background
------------------------------------------------------------------------------
*mileszs/ack.vim*
|:Ack| <pattern>
------------------------------------------------------------------------------
*junegunn/goyo.vim*
||:Goyo|| enters zen mode
------------------------------------------------------------------------------
*tpope/vim-commentary*
{visual}/ comment
{visual}gc comment
gc{motion} comment
gcap
------------------------------------------------------------------------------
*moll/vim-node*
Allows |gf| navigation on require('./xyz').
|gf| Go to file
|[I| search for keyword
------------------------------------------------------------------------------
*tpope/vim-sleuth*
Auto-detects tab/space settings.
------------------------------------------------------------------------------
*tpope/vim-dispatch*
`F9` dispatch
`,d` dispatch
`,D` dispatch! in background
running:
|:Focus| npm test
|:Dispatch| (or `f9`)
Usage:
|:Dispatch| bundle install
|:Dispatch| rspec %
In background:
|:Dispatch!| bundle install
|:Copen| (to show results)
Interactive processes (don't capture output)
|:Start| bundle exec rails c
|:Start!| make
------------------------------------------------------------------------------
*tpope/vim-rails*
Enables |gf| for files.
See: http://ricostacruz.com/cheatsheets/vim-rails.html
Commands: ~
|:A| alternate file
|:R| related file
Abbreviations: ~
AC:: ActionController
AR:: ActiveRecord
...
Extracting partials: ~
`:Rextract` `home/foo_partial`
App: ~
:Econtroller <file> # app/controllers/*_controller.rb
:Ehelper # app/helpers/*_helper.rb
:Emodel <file> # app/models/*.rb
------------------------------------------------------------------------------
*mhinz/vim-startify*
:Startify # opens start
:SSave # save session
------------------------------------------------------------------------------
*tpope/vim-unimpaired*
Navigate:~
]a # :next - next file
]b # :bnext - next buffer
]l # :lnext - next location list
]q # :cnext - next quickfix
]t # :tnext - next tag
[ previous, ] next
Options:~
col # list
cor # relativenumber
con # number
coc # cursorline
cou # cursorcolumn
cox # cursorcolumn + cursorline
cob # background (dark/light)
coi # ignorecase
cod # diffthis
cos # spell
cow # wrap
c toggle, [ on, ] off
Above and below:~
]p # paste below, indent
[p # paste above, indent
>p # paste below, indent +1
<p # paste below, indent -1
>P # paste above, indent +1
<P # paste above, indent -1
]<Space> # new line below
]e # move line below (like `ddp`)
[ above, ] below
Transforms:~
]y # string (\n)
]u # url (%20)
]x # xml (&)
[ encode, ] decode
Paste:~
yo # start insert mode with paste
yO # start insert mode with paste (line above)
------------------------------------------------------------------------------
*neomake*
:ll # view location list
[l ]l # jump to prev/next location (via unimpaired)
------------------------------------------------------------------------------
*alchemist*
K # show docs
C-] # jump to def
:ExDef Plug.Conn
:IEx
:Mix help
------------------------------------------------------------------------------
*tern_for_vim*
Tern for JavaScript.
:TernDef jump to definition (in the same file)
:TernRename rename variable in cursor
------------------------------------------------------------------------------
ALSO SEE *x-alsosee*
https://github.com/terryma/dotfiles/blob/master/.vimrc
https://github.com/vyorkin/dots/tree/master/tag-vim/vim/vundles
vim:tw=78:ts=8:ft=help:noexpandtab:nolist:norl: