Age | Commit message (Collapse) | Author |
|
The stock highlighting didn't recognise multiline strings.
"Like this \
one"
Add a better JS syntax highlighter.
|
|
Add a `<c-g>u` to my save command mapping in Insert mode so I can be
sure that my edits are progressively fed to the undo tree.
|
|
I typically don't want to search the vendor directory when I'm working
in Ruby projects.
|
|
Make a plugin out of a Stack Overflow post for a better autoread
augroup.
The `autoread` setting in vim will automatically reload a file if it's
been changed outside of vim (if you've made unsaved changes vim will
prompt before loading the file). By default, however, vim doesn't
automatically detect when a file has changed. It only happens when you
do certain things. This sets up an autocmd to force a check a bit more
often by tying into the CursorHold events. A bit hackish it seems but it
works like a charm.
This has been sorely needed especially since yesterday when I was
switching git branches in a project several times and editing various
files only to be alerted upon saving that the file on disk has changed.
Previously I would say it was a minor annoyance to have to type :e! in
those situations. Yesterday it was a freaking pain in the glaiven since
it happened unexpectedly so many times and after I was ready to
commit/save edits.
|
|
"tx" is an awkward pair of keys and it kind of hurts to type. Change the
mapping to something easier on the fingers.
|
|
Makes it easier to switch between two tabs when there are a bunch open.
Instead of having to memorize their tab numbers, just use this command.
Taken from
http://stackoverflow.com/questions/2119754/switch-to-last-active-tab-in-vim
|
|
Spell out what the mapping is doing.
|
|
Deleting or modifying quotes and other surrounding characters has become
too much of a pain. Time to install surround.
|
|
If I don't make the colour difference too drastic it still looks all
right, and it's _much_ easier to follow the guide if it's a different
colour than the two surrounding it.
|
|
It was getting annoying having to keep typing "gT" after every ":bd".
|
|
For a quick way to scroll two windows together. Useful for looking at
two different versions of a file where the versions are themselves
separate files.
|
|
* Add entry in CHANGELOG
* Delete commented trial lines
* Add source URLs in a comment above the new augroup
|
|
I did need to set `b:did_ftplugin` in an autocmd. Without doing so I
was only setting it for the first opened buffer, and subsequent buffers
would have filetype plugins enabled. I'm surprised that I didn't realise
it until today. Figured out that I should be setting the autocmd on
BufReadPre in order to get the variable set properly for all buffers
that I open.
|
|
Remove the `Stab` command now that I moved it to a self-contained plugin.
|
|
Take the `Stab` command from my vimrc and put it in a custom plugin.
This will keep my vimrc cleaner and since the the functions are
autoloaded it may ever so slightly improve performance.
|
|
|
|
Highlight the current line. Makes it easier to see where the cursor is.
|
|
Highlight background colour of the current line. Set it to a couple
stops lighter than the background colour.
|
|
|
|
|
|
Shows a visual representation of the current file's undo tree. Makes it
easier to see what you did and when, and roll back to a previous version.
I tried installing undotree.vim
(http://www.vim.org/scripts/script.php?script_id=4177), a pure
Vimscript plugin that's similar, but it requires vim 7.3 with patch005
applied which I don't have, and I'm not crazy about compiling a new vim.
|
|
Ensure that my changes can be undone if I accidentally press Ctrl-u or
Ctrl-w in insert mode.
|
|
Copy of Tim Pope's paste helper. I didn't want the full unimpaired.vim
but this functionality is really useful, so including it here in a
separate plugin.
|
|
Copied from
https://github.com/godlygeek/vim-files/blob/master/plugin/vsearch.vim
which resembles https://github.com/bronson/vim-visual-star-search but
uses the # and * keys directly instead of <leader>*. Allows text in the
current visual selection to be searched for as you would a word with #
and *.
|
|
Set two space indentation for Ruby.
|
|
Actually enjoyed the textwidth setting of the default gitcommit
ftplugin so bringing that over to my custom one.
|
|
Use a dark grey colour on statuslines of inactive windows to make it
easier to differentiate between active and inactive windows. The active
window remains the old light grey.
|
|
Move gitcommit indentation settings from vimrc to an ftplugin file.
Keeps things more organised and makes for a cleaner vimrc.
|
|
Working version of disabled default ftplugins.
|
|
Only run my ftplugins, not the ones that vim provides.
NOTE: this doesn't work. Figure out why.
|
|
To keep things organised, use the .vim/ftdetect directory instead of my
vimrc to set the JSON filetype.
|
|
* Ensure filetype plugin is on so that ftplugins get loaded
* Add a filetype plugin for python with PEP8 indentation and cancel my
custom mappings that preserve indentation on empty lines
|
|
For commentary.vim.
|
|
A command that removes line numbers and invisibles in one go so that
text can be more easily selected and copied at the OS level.
|
|
Faster way to create new tabs.
|
|
|
|
|
|
For moving inside camelCased and under_scored words.
|
|
|
|
* Remap toggle to <leader>ts
* Set column size to 1
* Set colours of guides to blend better with the background and be less
distracting
|
|
|
|
Visually displays indentation so you can have an easier time seeing
where a block ends.
Like BBEdit's tab stops (kind of), but looks more like the Visual
Studio style (blech).
Going to be amazingly useful since my team enforces 2-space indentation
for all front-end code (WTF???!).
|
|
This setting wasn't working for me, particularly when using EasyGrep,
so I've decided to remove it.
|
|
|
|
When in Insert mode, the statusline background colour changes to green.
In all other modes, the default reversed colours are used.
This change only appears when the twilight256 colourscheme is set.
|
|
* Add backup directories using .gitkeep files
* .gitignore:
- ignore files in the three backup directories
- ensure that .gitkeep files are not ignored
|
|
Only ignore the projects/ dir in the repository root. Who knows? we
might have a projects/ directory somewhere else in here that we want
to hold on to.
|
|
Instead of dropping .swp etc. files all over the filesystem, put them
in the `~/.vim/backup/` directory.
Here we have three directories, one for each of backups, swap, and
undo.
|
|
* Create an augroup to house syntax highlighting settings
* Add an autocmd that highlights JSON files using JavaScript syntax
highlighting
|
|
Useful to know. I like having it in BBEdit for those cases when a file
is for whatever reason not UTF-8, so adding it in here.
|