-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvim.org
More file actions
152 lines (130 loc) · 5.61 KB
/
Copy pathvim.org
File metadata and controls
152 lines (130 loc) · 5.61 KB
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
#+STARTUP: showall
#+TITLE: vim
#+AUTHOR: http://h4labs.com
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="/resources/css/myorg.css" />
#+INCLUDE: "dev_menu.org"
Menu: [[file:atom.org][Atom]] | [[file:emacs.org][Emacs]] / [[file:elisp.org][elisp]] / [[file:org-mode.org][Org Mode]] | [[file:intellij.org][IntelliJ]] | [[file:sublime.org][Sublime]] | [[file:vim.org][vim]] | [[file:xcode.org][Xcode]]
* Inbox
+ [[https://robots.thoughtbot.com/how-to-do-90-of-what-plugins-do-with-just-vim][How to Do 90% of What Plugins Do (With Just Vim)]]
+ https://github.com/learnbyexample/vim_reference
+ https://www.reddit.com/r/vim/comments/47lhdn/unleash_your_vim_fu_talk_at_vim_barcelona
+ [[http://vim.wikia.com/wiki/Invert_the_number_row_keys_for_faster_typing][Invert the number row keys for faster typing]]
+ http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118
+ http://vimeo.com/vimlondon
+ http://vimeo.com/user1690209
+ http://www.youtube.com/playlist?list=PL8tzorAO7s0jy7DQ3Q0FwF3BnXGQnDirs
+ https://vim.zeef.com/patrick.schanen
+ [[http://www.moolenaar.net/habits.html][Seven habits of effective text editing]]
+ Reddit
- [[http://www.reddit.com/r/vim/comments/3p1vuc/tips_on_using_vim_as_a_word_processor][Tips on using vim as a word processor]]
- [[http://www.reddit.com/r/vim/comments/3n34j4/do_you_use_an_autocomplete_plugin_if_yes_which_one][Do you use an autocomplete plugin]]
- [[https://www.reddit.com/r/vim/comments/45jvw6/how_i_vim_damian_conway][How I vim - Damian Conway]]
* Why vim?
+ http://stevelosh.com/blog/2010/09/coming-home-to-vim/#why-i-came-back-to-vim
* Cheetsheets
+ http://vimcheatsheet.com
- https://cdn.shopify.com/s/files/1/0165/4168/files/preview.png
+ http://michael.peopleofhonoronly.com/vim/
+ https://www.fprintf.net/vimCheatSheet.html
* Tutorials
+ vimtutor; # command line; run from Terminal
+ [[http://derekwyatt.org/vim/tutorials/][Vim Videos]] - Derek Wyatt
+ [[http://danielmiessler.com/study/vim][A vim Tutorial and Primer]]
+ http://github.com/spike01/learning-vim
+ [[http://zzapper.co.uk/vimtips.html][Best of VIM Tips]]
+ http://vim-adventures.com
+ [[https://github.com/bpierre/switch-to-vim-for-good][Switch To Vim For Good]]
+ [[http://howivim.com][How I vim]]
+ http://vimcasts.org/
* .vimrc
+ http://news.ycombinator.com/item?id=10364760 - A Good vimrc
* Advanced Topics
+ http://www.reddit.com/r/vim/comments/3hxmsy/let_vim_do_the_typing
+ http://news.ycombinator.com/item?id=10315645 - To Master vim, use it like language
+ http://ferd.ca/vim-and-composability.html
+ [[http://learnvimscriptthehardway.stevelosh.com][Learn Vimscript the Hard Way]]
+ http://www.reddit.com/r/vim/comments/3jnxy1/quora_what_are_the_most_amazing_things_that_can
+ http://colindrake.me/2015/06/25/objective-c-ctags-vim
+ http://vimregex.com
+ https://www.reddit.com/r/vim/comments/4gim6l/what_vim_ideas_help_pages_took_you_from/
* Evil - Emacs vim
+ http://www.reddit.com/r/vim/comments/3fvbxw/evil_vi_improved_improved
+ http://blog.aaronbieber.com/2015/05/24/from-vim-to-emacs-in-fourteen-days.html
* Plugins
+ https://code.tutsplus.com/tutorials/vim-essential-plugin-easymotion--net-19223
+ https://github.com/justinmk/vim-sneak
+ [[https://github.com/valloric/youcompleteme][YouCompleteMe]]
- http://davisvigneault.com/2016/02/youcompleteme-rocks
+ http://github.com/bkad/CamelCaseMotion
+ http://github.com/tpope/vim-surround
+ http://github.com/tpope/vim-unimpaired
+ http://github.com/ctrlpvim/ctrlp.vim
+ http://github.com/terryma/vim-multiple-cursors
+ http://github.com/rking/ag.vim
+ http://github.com/unblevable/quick-scope
+ https://github.com/jceb/vim-orgmode
* vim and Dvorak
+ http://superuser.com/questions/81984/dvorak-hotkey-remapping-in-vim-worth-it
+ https://www.reddit.com/r/vim/comments/257t8c/vim_for_dvorak
* Commands
+ :help objects
+ inoremap jk <ESC>
+ ^[ or ^C for ESC
+ Ctrl+o - prev loc
+ :registers
* Navigation
| Keystrokes | Description | More |
|w|Next word||
|b|back word|
|e|end of current word|
|f|find character forward in line|fa,fb - cursor placed on character. Use . to repeat|
|t|Move forward unTil character|ta, tb - cursor placed before character. Use . to repeat|
|F|find character backwards in line|fa,fb - cursor placed on character. Use . to repeat|
|T|Move backwards unTil character|ta, tb - cursor placed after character. Use . to repeat|
|)|Forward one sentence|
|}|Forward one paragraph |
|gf|Goto file||
* Editing
| Keystrokes | Description | More |
|C-w|delete word
| di[| delete inner to bracket ]|
|di{|,delete inner to {|
|di"|delete inner to "|
|da[|delete all - brackets too|
|ya"|Yank all
|yi"|Yank inner|
|ci"|change inside "|
|.|repeat| http://stackoverflow.com/questions/12566235/what-can-the-dot-command-repeat-exactly , http://stackoverflow.com/questions/7325052/can-someone-explain-to-me-why-the-dot-command-is-so-useful-in-vim
* Macros
#+BEGIN_EXAMPLE
qq - record macro. ESC to end record
@q - play macro
10q - play 10 times
<,> ???
set @q=fooC-vbar - set the macro. Has a newline C-v
#+END_EXAMPLE
* Autocompletion
#+BEGIN_EXAMPLE
:set complete - Show where to look for completions
#+END_EXAMPLE
#+BEGIN_EXAMPLE
C-x - The vim completion prefix
C-x C-n - complete word
C-x C-l - complete line
C-x C-] - tag
C-x C-o -
#+END_EXAMPLE
#+BEGIN_EXAMPLE
replace mode (R)
insert normal mode (<c-o>)
paste from a register in insert mode (<c-r>reg)
expression register (=)
clipboard and active selection registers (+, * respectively)
command ranges (e.g. 10,+5s/foo/bar/g)
miscellaneous commands (:global, :argdo, :normal, etc...)
#+END_EXAMPLE
* Misc
** Show row count away from current line
#+BEGIN_EXAMPLE
:set relativenumber
#+END_EXAMPLE