f21eea8d6efc

New movement keys, OMG.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 17 Dec 2010 14:42:43 -0500
parents 70f57305bf8b
children 63033a83a6ff
branches/tags (none)
files mutt/muttrc vim/.vimrc vim/ftplugin/html/closetags.vim

Changes

--- a/mutt/muttrc	Tue Dec 14 20:51:32 2010 -0500
+++ b/mutt/muttrc	Fri Dec 17 14:42:43 2010 -0500
@@ -92,18 +92,20 @@
 bind index i            noop
 
 # bindings
+bind index l            previous-entry
+bind index k            next-entry
 bind pager i            exit
 bind pager /            search
-bind pager k            previous-line
-bind pager j            next-line
+bind pager l            previous-line
+bind pager k            next-line
 bind pager gg           top
 bind pager G            bottom
 bind index gg           first-entry
 bind index G            last-entry
-bind pager K            previous-undeleted
-bind pager J            next-undeleted
-bind index K            previous-unread
-bind index J            next-unread
+bind pager L            previous-undeleted
+bind pager K            next-undeleted
+bind index L            previous-unread
+bind index K            next-unread
 bind index,pager R      group-reply
 
 # macros
--- a/vim/.vimrc	Tue Dec 14 20:51:32 2010 -0500
+++ b/vim/.vimrc	Fri Dec 17 14:42:43 2010 -0500
@@ -79,24 +79,36 @@
 map <F2> :NERDTreeToggle<cr>
 let NERDTreeIgnore=['.vim$', '\~$', '.*\.pyc$', 'pip-log\.txt$']
 
-" Use the damn hjkl keys
-nnoremap <up> <nop>
-nnoremap <down> <nop>
-nnoremap <left> <nop>
-nnoremap <right> <nop>
+" MOVEMENT ---------------------------------------
 
-" And make them fucking work, too.
-nnoremap j gj
-nnoremap k gk
+" Use the damn jkl; keys
+"nnoremap <up> <nop>
+"nnoremap <down> <nop>
+"nnoremap <left> <nop>
+"nnoremap <right> <nop>
+
+" Why stretch?
+noremap h ;
+noremap j h
+noremap k gj
+noremap l gk
+noremap ; l
 
 " Easy buffer navigation
-map <C-h> <C-w>h
-map <C-j> <C-w>j
-map <C-k> <C-w>k
-map <C-l> <C-w>l
-map <leader>w <C-w>v<C-w>l
+" Note: For this section to make any sense you need to remap Ctrl-; to Ctrl-m at
+"       the KEYBOARD level.  The reason is that for some reason the OS X doesn't
+"       recognize the Ctrl+; combination as something special, so it just passes it
+"       to Vim as a semicolon.
+"
+"       Yeah, it's dumb.
+noremap <C-j>  <C-w>h
+noremap <C-k>  <C-w>j
+noremap <C-l>  <C-w>k
+noremap <C-m>  <C-w>l
+noremap <leader>w <C-w>v<C-w>l
 
-" Folding
+" Folding ----------------------------------------
+
 set foldlevelstart=0
 nnoremap <Space> za
 vnoremap <Space> za
@@ -191,6 +203,7 @@
 
 " Faster Esc
 inoremap jj <ESC>
+inoremap kk <ESC>
 
 " TextMate-Style Autocomplete
 inoremap <ESC> <C-P>
--- a/vim/ftplugin/html/closetags.vim	Tue Dec 14 20:51:32 2010 -0500
+++ b/vim/ftplugin/html/closetags.vim	Fri Dec 17 14:42:43 2010 -0500
@@ -15,25 +15,25 @@
     let UnaryTags = ' Area Base Br DD DT HR Img Input Link Meta Param '
 
     " remember current position:
-    normal mz
+    normal! mz
 
     " loop backwards looking for tags:
     let Found = 0
     while Found == 0
       " find the previous <, then go forwards one character and grab the first
       " character plus the entire word:
-      execute "normal ?\<LT>\<CR>l"
-      normal "zyl
+      execute "normal! ?\<LT>\<CR>l"
+      normal! "zyl
       let Tag = expand('<cword>')
 
       " if this is a closing tag, skip back to its matching opening tag:
       if @z == '/'
-        execute "normal ?\<LT>" . Tag . "\<CR>"
+        execute "normal! ?\<LT>" . Tag . "\<CR>"
 
       " if this is a unary tag, then position the cursor for the next
       " iteration:
       elseif match(UnaryTags, ' ' . Tag . ' ') > 0
-        normal h
+        normal! h
 
       " otherwise this is the tag that needs closing:
       else
@@ -44,7 +44,7 @@
 
     " create the closing tag and insert it:
     let @z = '</' . Tag . '>'
-    normal `z"zp
+    normal! `z"zp
 
   else " filetype is not HTML
     echohl ErrorMsg