Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I remap the semicolon to the colon in my .vimrc:

  nmap ; :
This makes it much easier to type commands, since you don't need to use a keyboard chord.

After using this for a year or so, I found out that the semicolon actually has its own function--it can refer to the current insertion point when writing ranges. But I've never used that; one could remap : to ; if desired.



u p v o t e!! Brilliant (IMHO). I don't even want to think how many shift+: chords I've done could have been just a semicolon.

Even better:

    nmap ; :
    noremap ;; ;
Idea from http://vim.wikia.com/wiki/Map_semicolon_to_colon


In normal mode, after using f or F to jump to a character, ; repeats the motion and jumps to the next match. I find myself using this often enough that if I swapped mappings for : and ; I would be in a world of confusion.


Ha. I did as well, so I remapped <space> to ;. Now when I f, t, F, or T, and want to move to the next one, I hit space.

Come to think of it, maybe I should just remap <space> to : and leave ; alone?


I map <space> to : and it's been great. <space> is normally just a synonym for l, so I never used it; my only muscle memory issue is just an occasional : to enter command mode. Perhaps I should unmap :.


; also repeats f and t

but : is much more common so it makes sense to swap them




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: