Skip to content

Instantly share code, notes, and snippets.

@kbaribeau
Created April 3, 2012 18:13
Show Gist options
  • Save kbaribeau/2294333 to your computer and use it in GitHub Desktop.
Save kbaribeau/2294333 to your computer and use it in GitHub Desktop.
Annoyances / Fixes when switching from vim to sublime

CTRL+O/CTRL+I (forward / back)

  • partial fix: add this to your user keybindings (this only works between files, not within a file)
    [
         { "keys": ["ctrl+o"], "command": "next_view_in_stack" },
         { "keys": ["ctrl+i"], "command": "prev_view_in_stack" }
    ]

CTRL+D/CTRL+U

  • FIX: add this to your user keybindings
   {"keys": ["ctrl+u"], "command": "scroll_lines", "args": {"amount": 40.0}, "context": [{ "key": "setting.command_mode" }]},
   {"keys": ["ctrl+d"], "command": "scroll_lines", "args": {"amount": -40.0}, "context": [{"key": "setting.command_mode"}]}

GIT BLAME

  • I have to click on the new window after I git blame something (fix: blame from a visual mode)
  • I have to re-navigate to the line I was looking at after blaming something (fix: blame from a visual mode)

% Matching

  • % matching doesn't work for ruby methods, if statements, loops etc.

Misc Annoyances

  • when I open a new file, sublime starts off in insert mode (fix: see comments)

  • I'm sure this is doable, but I haven't figured out how to add abbreviations yet. For example, I'd like 'rdebug' to expand to: require "ruby-debug"; debugger

  • I'd love to have extra whitespace at the end of a line show up as red (like it does in a git diff from the command line). I did notice that whitespace characters are visible under a selection by default, and I can turn them on globally, but it could be better.

  • In ruby, having sublime automagically insert "end" when I type "do" would be handy. If it can do it in the same way endwise works for vim that'd be doubly handy.

@michaelphines
Copy link

Try git blaming in visual block mode

@kbaribeau
Copy link
Author

Awesome, thanks!

I'm not sure on auto-trimming whitespace on save because I don't want to be trimming everyone else's bad whitespace all the time. I only care about lines I'm already editing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment