aboutsummaryrefslogtreecommitdiffstats
path: root/vimrc
AgeCommit message (Collapse)Author
2015-07-21vimrc: Add Netrw mappings for :Explore and its siblingsTeddy Wing
Typing `:E` is not difficult, and while `:Sex` and `:Vex` were not great to type, they were okay. What really tipped me over the edge was `:Rex`. And since I use Netrw more frequently these days, it's finally annoying enough that I want some more efficient mappings for these commands.
2015-07-14vimrc: Add <leader>bb mappingTeddy Wing
Added a bunch of mappings in 061f2a2298c2c8419d9cab61749d9db3758f8690 to open buffers in all manner of ways but forgot the simplest one: open in the current window. Do that here with a <leader>bb mapping.
2015-07-14vimrc: Set `splitright`Teddy Wing
Open new vertical splits to the right of the current window because I often end up moving my newly-opened split to the right anyway. Makes sense to have Vim do it for me and save a few keystrokes.
2015-07-13vimrc: Update pick mappingsTeddy Wing
Use our old Command-T mapping but extend it to work in the context of pick, where we need to have separate mappings depending on how we want to open a file or buffer.
2015-07-13vimrc: Remove Command-T configurationTeddy Wing
Now that I've removed Command-T (236fcf4d68da2c5076b37081dc13ff4b865c528a), we can remove its configuration.
2015-07-13vimrc: Remove Unite configurationTeddy Wing
Now that I've removed Unite in 95256a840f492eaa45c8a0e78791a0916821f9a9, we can remove its configuration and mappings.
2015-07-13vimrc: Remove CtrlP configurationTeddy Wing
Since I removed CtrlP in 1aa1b4d3258c8d962f965da3e33ee20ee206d5f0, we can remove its configuration also.
2015-07-13vimrc: Add extended pick.vim buffer mappingsTeddy Wing
* Add new mappings to have pick.vim open buffers in a new split, vsplit, or tab * Add `PickBufferListCommand` function copied directly from the pick.vim plugin to give me the correct pick list since the function isn't accessible outside the script. We can then combine this list with the appropriate opening command.
2015-07-13vimrc: Use `find` as pick.vim commandTeddy Wing
By default pick.vim uses `git ls-files` for its file listing. This ignores untracked files, which I would like to be able to open. Use a custom pick command copied from the pick.vim source to show untracked files in the pick list.
2015-07-13vimrc: Add mappings for pick.vimTeddy Wing
Mappings to run pick and open a buffer from it in various configurations.
2015-07-12vimrc: Use ag for Ctrl-PTeddy Wing
Use `ag` as Ctrl-P's grep program to make it faster.
2015-07-12vimrc: Add unite.vim mappingsTeddy Wing
* Mappings to open files and buffers with Unite.vim in split buffers and tabs * Use fuzzy matching * Use `ag` as the backing grep program to make things faster
2015-07-11vimrc: Disable auditory.vimTeddy Wing
Wish there was an easy way to toggle the plugin on and off with a command in the plugin (e.g. `:AuditoryToggle`). Would be nice to enable it when I wanted to and have it disabled at other times. I like it but there are times when I don't want my computer to be playing music when I'm typing or editing text. Disable it by default.
2015-07-11vimrc: Remove Autocommands sectionTeddy Wing
This was commented out anyway and I don't plan on using the vimrc sourcing command. This section can be safely removed.
2015-07-11vimrc: Remove CopyModeToggle commandTeddy Wing
Haven't used this command in ages because it doesn't really work well. These days I use my <leader>c visual mapping for copying text instead of copying it directly from the window. This command also doesn't handle copying from split windows. Pretty soon I should install Chris Toomey's text object copy plugin as that will be quite a bit nicer than my current system.
2015-07-10vimrc: Remove <leader>bl mappingTeddy Wing
I wasn't using it, instead favouring `:ls`, so we don't need it any more.
2015-07-09vimrc: Add Netrw window size & sort optionsTeddy Wing
* Move Netrw settings down to the Plugins section * Set an empty window size to make new :Vexplore windows open at half-width instead of being fixed at 25-ish columns (or whatever I had set for NERD Tree). Even after removing NERD Tree, for some reason :Vexplore refuses to open windows at the default unset window size, always using 25-ish. * Set case-insensitive sort so that uppercase file names don't appear above lowercase file names because it's confusing for the list to not be fully alphabetical from top to bottom.
2015-07-06vimrc: Remove NERD Tree configurationTeddy Wing
Now that I removed NERD Tree (6d7ea2be365959b8aa348d5942846111a85480f6), this configuration is no longer needed.
2015-07-06vimrc: Remove EasyGrep configurationTeddy Wing
Now that I removed the EasyGrep plugin (52927a37be4b978417c7835cebeed975ef90e0ca), we no longer need to set its configuration options.
2015-06-04vimrc: Fix CHANGELOG dateTeddy Wing
Wanted to capture the fact that the `g:netrw_liststyle` change was made on 2015.06.02 but forgot to change to today's date when adding the CHANGELOG entry for the `<leader>or` change.
2015-06-04vimrc: Add <leader>or mappingTeddy Wing
Add a mapping to open the current file in `ranger`, the console file explorer. I already have a similar command to open the current file in Finder, but these days I find ranger a bit more pleasant to use, particularly if I'm already in the console. It's definitely more keyboard-friendly. This came about because I was trying to copy a file and the built-in Vim methods for doing so that I know of were more complicated than I wanted. 1. Use :saveas [filename] This method does the right thing in copying but the copy goes to Vim's :pwd. I wanted it to go to the same directory the file was in. 2. Use Netrw The mf mt mc commands were a little confuddling to me. It makes sense when copying a file to a directory, but how do I duplicate a file in the same directory? 3. Use :shell Opens a shell, but in Vim's :pwd, not in the current file's directory. Maybe I should make a mapping for this.
2015-06-04vimrc: set g:netrw_liststyle=3Teddy Wing
Use Netrw's tree view. This makes Netrw function a lot more like NERDTree. In fact, that's the primary reason why I use NERDTree in the rare cases that I need it these days. We can probably remove NERDTree from the plugin list after this. Thanks very much to Mo Zhu for introducing me to this setting at BostonRB project night last Tuesday. Would have committed it then but I was thinking I'd do some plugin changes and uninstall NERDTree before doing so. I haven't and now I want to make another change to my vimrc so let's just commit this now.
2015-01-06virmc: Set backupcopy=yesTeddy Wing
Add setting to preserve file attributes, such as creation date. I went to check the creation date of a file I know was created at least a year ago, but its creation date was today and the same as its modified date. I had recently edited the file in Vim, and that ended up being the problem. This setting ensures that files are reused so their attributes are preserved. What an unfortunate loss of history since last April.
2014-11-15vimrc: Add <leader>p mappingTeddy Wing
Add a mapping to read from the OS X pasteboard. Pasting directly in insert mode is excessively slow when dealing with a lot of text. Likely caused by too much redrawing. Reading directly from the OS X pasteboard is much faster, so add a mapping for that.
2014-11-12vimrc: set sessionoptions-=optionsTeddy Wing
This setting tells vim not to save options & mappings in persisted sessions. This allows open buffers, windows, and tabs to be saved but configuration options and plugins to be different when reopening a session. Useful if I've made modifications to my vimrc after creating a session. Found out about this from https://github.com/xolox/vim-session. Really cool that this exists. It's been something that annoyed me for a while but I never bothered to find a solution.
2014-11-05vimrc: Add command mode mappings for word movementTeddy Wing
Never being able to move by word in command mode would always get on my nerves. In particular if I was trying compose a long command. Sure you can bring up a command window but that's not what I think of first when starting to writing a command. Luckily `cmdline.txt` in vim help has the answer! Since Shift-Left/Right doesn't work for me and I'm using Control-Left/Right to move between OS X spaces (not even sure if the Control modifier version works for this either), create bash/emacs-style mappings to move between words in command mode. I'm sorry I didn't find this earlier but it does feel good to have a big annoyance solved.
2014-10-30vimrc: Add <leader>tq mappingTeddy Wing
<leader>tq quits a window and goes to the previous tab. I was getting tired of doing `:q` -> `gT`. I know I have <leader>td but I've been working on some projects lately where I don't want to delete the buffers from my session.
2014-09-10vimrc: Add <leader>r mapping to reload current fileTeddy Wing
Typing `:e!` is fine and all but I want a quicker way to do it.
2014-07-06vimrc: ignore node_modules/ from Command-TTeddy Wing
2014-07-02vimrc: source the built-in matchit pluginTeddy Wing
Allows for extended % matching, between things like < & >, HTML opening and closing tags, and general regex for various languages.
2014-06-29vimrc: remove commentary.vim autocmdsTeddy Wing
These are no longer required now that I've switched to tcomment.
2014-06-29vimrc: remove custom mappings for TabBarTeddy Wing
Now that I removed the plugin these are no longer necessary.
2014-06-28vimrc: add mapping to split multiple XML tags to separate linesTeddy Wing
Faster way of going from <div><span>Hello, world!</span></div> to <div> <span>Hello, world!</span> </div> Respects current indentation length and expandtab value.
2014-06-27vimrc: add line ending type to statuslineTeddy Wing
Show the type of line ending (line feed or carriage return & line feed, or in vim land unix & dos) in the statusline.
2014-06-27vimrc: fix whitespace of 2014.06.26 changelog headerTeddy Wing
2014-06-26vimrc: update <c-h> mapping to reselect selectionTeddy Wing
The visual selection would get dropped after saving using <c-h> from visual mode. Ensure that we're brought back to were we started before save.
2014-06-25vimrc: add <leader>sf mapping to :CommandTFlushTeddy Wing
:CommandTFlush reloads the search list. Necessary when switching branches or creating new files for example. Add a mapping to make it faster to do this.
2014-06-19vimrc: fix Open path in Finder mappingTeddy Wing
Allow paths with spaces.
2014-06-19vimrc: fix Open in Textmate mappingTeddy Wing
Allow paths with spaces.
2014-06-09vimrc: fix 'open in Finder' mappingTeddy Wing
I incorrectly set the mapping to open the current working directory instead of the current file's directory.
2014-06-09vimrc: add mapping to open current file's directory in FinderTeddy Wing
Useful for modifying the current file quickly. Did this manually a few times and it was kind of a pain.
2014-06-06vimrc: add mapping to open current file in TextMateTeddy Wing
Just in case. Can be useful to open the file in a different editor sometimes and if there's an easy way to do it all the better.
2014-06-06vimrc: mapping to copy text to OS X clipboardTeddy Wing
Since I'm using OS X's stock vim which isn't compiled with clipboard support, add a command to copy text to the clipboard. Useful when split windows are open or when I want to copy an entire file that takes up more than a single terminal page.
2014-06-05vimrc: add 0 and $ mappings for soft wrapped linesTeddy Wing
Make 0 go to the beginning of the visual line and $ go to the end. Have g0 and g$ go to the beginning and end of the _actual_ line.
2014-06-03vimrc: ensure an undo entry is created when saving in Insert modeTeddy Wing
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.
2014-06-03vimrc: ignore "vendor/" in Command-TTeddy Wing
I typically don't want to search the vendor directory when I'm working in Ruby projects.
2014-06-02vimrc: change <leader>tx mapping to use "td" insteadTeddy Wing
"tx" is an awkward pair of keys and it kind of hurts to type. Change the mapping to something easier on the fingers.
2014-05-30vimrc: add <leader>tl to go to last active tabTeddy Wing
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
2014-05-30vimrc: add comment to my "delete buffer & go to previous tab" mapTeddy Wing
Spell out what the mapping is doing.
2014-05-30vimrc: make even Indent Guides slightly ligher than odd onesTeddy Wing
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.