Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: amiel/dotfiles
base: 64bd35620f
...
head fork: amiel/dotfiles
compare: 7d61200014
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Jul 11, 2014
Amiel Martin Reindent vimrc bddfd72
Commits on Jul 15, 2014
Amiel Martin New key mappings 7d61200
Showing with 26 additions and 18 deletions.
  1. +26 −18 home/vimrc
44 home/vimrc
View
@@ -88,8 +88,6 @@ set winwidth=13 winminwidth=13
set winheight=50 winwidth=96
-
-
set scrolloff=4
set switchbuf=useopen,split
@@ -198,7 +196,13 @@ highlight Title term=NONE cterm=NONE ctermbg=235 ctermfg=238
" center cursor position in screen
nmap <space> zz
-map <leader>y "*y
+map <leader>a =ip
+
+" apply macros easily with Q
+nnoremap Q @q
+vnoremap Q :norm @q<cr>
+
+set pastetoggle=<leader>z
" Move around splits with <c-hjkl>
nnoremap <c-j> <c-w>j
@@ -206,12 +210,16 @@ nnoremap <c-k> <c-w>k
nnoremap <c-h> <c-w>h
nnoremap <c-l> <c-w>l
+" rotate windows
nnoremap <c-w><c-o> <c-w>r
nnoremap <c-s> <c-w>j<c-w>=
" nnoremap <c-+> <c-w>+
" nnoremap <c--> <c-w>-
+" shift l/h to switch tabs
+noremap <S-l> gt
+noremap <S-h> gT
" New vertical split, switch to it
@@ -248,7 +256,7 @@ nnoremap <leader><leader> <c-^>
nnoremap / /\v
vnoremap / /\v
-map ,= mzgg=G`z
+map <leader>= mzgg=G`z
@@ -284,11 +292,11 @@ let g:CommandTWildIgnore=&wildignore . ",node_modules/**"
" Open files with <leader>h
map <leader>h :CommandT<cr>
-map <leader>f :CommandTFlush<cr>\|:CommandT<cr>
-" Open files, limited to the directory of the current file, with <leader>gf
+
+" Open files, limited to the directory of the current file
" This requires the %% mapping found below.
map <leader>nh :CommandTFlush<cr>\|:CommandT %%<cr>
-map <leader>nb :CommandTFlush<cr>\|:CommandTBuffer<cr>
+map <leader>nt :CommandTFlush<cr>\|:CommandTBuffer<cr>
map <leader>nad :CommandT app/admin<cr>
map <leader>nas :CommandT app/assets<cr>
@@ -308,12 +316,12 @@ map <leader>ne :call CommandTInRailsEngine()<cr>
map <leader>gR :call ShowRoutes()<cr>
function! CommandTInRailsEngine()
- let in_engine_file = match(expand("%"), '^engines/.\+$') != -1
+ let in_engine_file = match(expand("%"), '^engines/.\+$') != -1
- if in_engine_file
- let engine_dir = substitute(expand("%"), '^\(engines/\w\+\)/.*$', '\1', '')
- exec ":CommandT " . engine_dir
- endif
+ if in_engine_file
+ let engine_dir = substitute(expand("%"), '^\(engines/\w\+\)/.*$', '\1', '')
+ exec ":CommandT " . engine_dir
+ endif
endfunction
" Rake Routes
@@ -371,12 +379,12 @@ map <leader>T :VroomRunNearestTest<cr>
" MULTIPURPOSE TAB KEY
" Indent if we're at the beginning of a line. Else, do completion.
function! InsertTabWrapper()
- let col = col('.') - 1
- if !col || getline('.')[col - 1] !~ '\k'
- return "\<tab>"
- else
- return "\<c-n>"
- endif
+ let col = col('.') - 1
+ if !col || getline('.')[col - 1] !~ '\k'
+ return "\<tab>"
+ else
+ return "\<c-n>"
+ endif
endfunction
inoremap <tab> <c-r>=InsertTabWrapper()<cr>
inoremap <s-tab> <c-n>

No commit comments for this range

Something went wrong with that request. Please try again.