News for hackers. Stuff that matters.
Re:What is in your .vimrc by oinksoft on Saturday August 20, 2011 @07:27PM (#2908038)
This is one of my favorite bits from my .vimrc. It lets you use !find with location list:

  function! g:Find(...)
      let subexpr = 'substitute(v:val, ".*", "\"&\" 0: found", "")'
      let found = join(map(split(system('find ' . join(a:000, ' ')), '\n'), subexpr), "\n")
      exec 'lgete "' fnameescape(found) '" | lop'
  endfunction

  command! -nargs=+ Find call g:Find(<f-args>)
The :Find command above passes its arguments to `find`.

I use splits heavily, and these mappings for navigating and resizing splits are indispensable:

  nnoremap <C-K> <C-W>k
  nnoremap <C-J> <C-W>j
  nnoremap <C-H> <C-W>h
  nnoremap <C-L> <C-W>l
  nnoremap _ 3<C-W><LT>
  nnoremap + 3<C-W>>

There are no comments on this comment yet.