You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.md
+23-71
Original file line number
Diff line number
Diff line change
@@ -127,87 +127,39 @@ Marks allow you to jump to designated points in your code.
127
127
Vim is quite unpleasant out of the box. For example, typeing `:w` for every file save is awkward and copying and pasting to the system clipboard does not work. But a few changes will get you much closer to the editor of your dreams.
* Copy this to your home directory and restart vim. Read through it to see what you can now do (like `[space]w` to save a file)
132
-
* mac users - making a hidden normal file is suprisingly tricky. Here’s one way:
133
-
* in the command line, go to the home directory
134
-
* type `nano .vimrc`
135
-
* paste in the contents of the .vimrc file
136
-
* `ctrl+x`, `y`, `[enter]` to save
137
-
* This is a minimal vimrc that focuses on three priorities:
138
-
* adding options that are strictly better (like more information showing in autocomplete)
139
-
* more convenient keystrokes (like `[space]w` for write, instead of `:w [enter]`)
140
-
* a similar workflow to normal text editors (like enabling the mouse)
141
-
* You should now be able to press `[space]w` in normal mode to save a file. And `[space]p` to paste from outside of vim.
142
-
* If you can’t paste, it’s probably because vim was not built with the system clipboard option. To check, run `vim --version` and see if `+clipboard` exists. If it says `-clipboard`, you will not be able to copy from outside of vim.
143
-
* For mac users, homebrew does this right. Install homebrew and then run `brew install vim`.
144
-
* then move the old vim binary: `$ mv /usr/bin/vim /usr/bin/vimold`
145
-
* restart your terminal and you should see `vim --version` now with `+clipboard`
130
+
*[My .vimrc file](https://github.com/theicfire/dotfiles/blob/master/vim/.vimrc) has some pretty great ideas I haven't seen elsewhere.
131
+
* This is a minimal vimrc that focuses on three priorities:
132
+
* adding options that are strictly better (like more information showing in autocomplete)
133
+
* more convenient keystrokes (like `[space]w` for write, instead of `:w [enter]`)
134
+
* a similar workflow to normal text editors (like enabling the mouse)
135
+
136
+
### Installation
137
+
* Copy this to your home directory and restart vim. Read through it to see what you can now do (like `[space]w` to save a file)
138
+
* mac users - making a hidden normal file is suprisingly tricky. Here’s one way:
139
+
* in the command line, go to the home directory
140
+
* type `nano .vimrc`
141
+
* paste in the contents of the .vimrc file
142
+
* `ctrl+x`, `y`, `[enter]` to save
143
+
* You should now be able to press `[space]w` in normal mode to save a file.
144
+
*`[space]p` should paste from the system clipboard (outside of vim).
145
+
* If you can’t paste, it’s probably because vim was not built with the system clipboard option. To check, run `vim --version` and see if `+clipboard` exists. If it says `-clipboard`, you will not be able to copy from outside of vim.
146
+
* For mac users, homebrew install vim with the clipboard option. Install homebrew and then run `brew install vim`.
147
+
* then move the old vim binary: `$ mv /usr/bin/vim /usr/bin/vimold`
148
+
* restart your terminal and you should see `vim --version` now with `+clipboard`
146
149
147
150
##Plugins
148
-
* The easiest way to make vim more powerful is to use Vintageous in sublime (version 3). This gives you Vim mode inside sublime. I suggest this (or a similar setup with the Atom editor) if you aren't a vim master.
149
-
* Vintageous is great, but there’s a few things you have to do to tame it.
150
-
* Get the [current version](https://github.com/guillermooo/Vintageous) of Vintageous (I last used 3.5.1), and extract it to `~/.config/sublime-text-3/Packages/Vintageous` (or wherever the Packages directory is) (Do not use the package manager; we don’t want compiled python. We want to edit the python)
151
-
* edit `Vintageous/Default.sublime-keymap`, and comment out (put `//` in front of lines) the references to certain useful shortcuts that you don’t want Vintageous to overwrite (first check each to see if it’s overwritten)
152
-
*`ctrl+w` - close
153
-
*`ctrl+s` - save
154
-
*`tab` - indent
155
-
*`ctrl+n` - new file
156
-
*`ctrl+a` - select all
157
-
*`ctrl+f` - find
158
-
*`/` from vim also works, but it’s not as useful sometimes
151
+
* The easiest way to make vim more powerful is to use Vintageous in sublime (version 3). This gives you Vim mode inside sublime. I suggest this (or a similar setup with the Atom editor) if you aren't a vim master. Check out [Advanced Vim](advanced.html) if you are.
152
+
* Vintageous is great, but I suggest you change a few settings to make it better.
153
+
* Clone [this repository](https://github.com/theicfire/Vintageous) to `~/.config/sublime-text-3/Packages/Vintageous`, or similar. Then check out the "custom" branch.
154
+
* Alternatively, you can get a more updated Vintageous version by cloning [the official](https://github.com/guillermooo/Vintageous) repo and then copying over [this patch](https://github.com/theicfire/Vintageous/commit/19ff6311b01e3ae259b7eb8e3944687b42ba06ff).
159
155
* Change the user settings (`User/Preferences.sublime-settings`) to include:
160
156
*`"caret_style": "solid"`
161
157
* This will make the cursor not blink, like in vim.
162
158
* sublime might freeze when you do this. It’s a bug; just restart sublime after changing the file.
163
-
* Change `Vintageous/Preferences.sublime-settings`, and change the following fields:
*[https://github.com/guillermooo/Vintageous/pull/562/files](https://github.com/guillermooo/Vintageous/pull/562/files) will open new files in command mode, as expected
168
159
*`ctrl+r` in vim means "redo". But there is a handy ctrl+r shortcut in sublime that gives an "outline" of a file. I remapped it to alt+r by putting this in the User keymap
*[Add the ability to toggle vintageous on and off](https://github.com/guillermooo/Vintageous/wiki/Toggling-Vintageous)
171
162
* Mac users: you will not have the ability to hold down a navigation key (like holding j to go down). To fix this, run the commands specified here: [https://gist.github.com/kconragan/2510186](https://gist.github.com/kconragan/2510186)
172
-
* Get sublime to not copy when highlighting and pasting (pressing p) by doing the following:
173
-
* go into `sublime-text-3/Packages/Vintageos/actions.py` and comment out the line (and wrapping if statement) that says `state.registers['"'] = prev_text`. I bet there’s a better way to do this, but this seems to work.
174
-
* recent work on Vintageous moved the file to xactions.py. It will probably change soon in the future. Here’s the diff of what I removed, so hopefully you can find the same diff in the future:
175
-
176
-
~~~~~~~
177
-
--- a/xactions.py
178
-
+++ b/xactions.py
179
-
@@ -1542,9 +1542,9 @@ class _vi_big_p(ViTextCommandBase):
180
-
fragments = state.registers['"']
181
-
182
-
- if state.mode == modes.VISUAL:
183
-
+ #if state.mode == modes.VISUAL:
184
-
# Populate registers with the text we're about to paste.
185
-
- state.registers['"'] = prev_text
186
-
+ # state.registers['"'] = prev_text
187
-
188
-
sels = list(self.view.sel())
189
-
if len(sels) == len(fragments):
190
-
@@ -1640,14 +1640,14 @@ class _vi_p(ViTextCommandBase):
191
-
print("Vintageous: Nothing in register \".")
192
-
return
193
-
194
-
- if state.mode == modes.VISUAL:
195
-
- # force register population. We have to do it here
0 commit comments