My vim configuration files
You can copy the files like usual, I've made a install.sh
script you can run
though to do it as well.
The biggest things are my custom syntax colors, spell check is enabled, and <Tab>
being bound to
opening netrw
to give you a file browser in the editor.
If you're new to netrw
here are some quick shortcut keys you can use in the
window:
Enter
- Edit file - Opens the highlighted file in the last used buffer.%
- Create new file - Creates a new file in CWD, NOT the one you've highlighted. This does open the file in thenetrw
window though and pressing<Tab>
will close it without warning or writing.v
- Open in vertical split - Splits last active window vertically and opens file in new buffer.D
- Delete file - Deletes the highlighted file.R
- Rename file - Rename the highlighted file.x
- Open file - Open the highlighted file with associated program.(iexdg-open
, to view a PDF)
Here are some general vim tips that will help make your life easier. I'm skipping some basic ones you probably memorized already:
v
- Visual mode - Lets you see a text selection starting from where you cursor was. Can then be used with other commands likey
&d
.{
&}
- Next & Prev empty linegg
- Top of bufferGG
- Bottom of buffer.
- Repeat last edit - Repeats the last thing you did which can include editing in Insert mode. Very useful for bulk changes with using the command line./
&n
- Find & Next - Find instances of a search and move to the next instance.z=
- Spell check word - Shows similar words to replace a word with based on spelling. Chose new word with its number.
%
- Select buffer - This means you'll run the command on the whole buffer (ex%s/this/that/g
will replacethis
withthat
everywhere in the open file)#,#
- From line # to line # - Select line number range to perform command on.(ex22,25s/this/that/g
will replacethis
withthat
on lines 22, 23, 24, & 25 in the open file)
:
- Run command on selection - This will insert'<,'>
in the command line which will let you run commands on the selected text.(ex'<,'>s/this/that/g
will replacethis
withthat
in the selected text)