Created
May 8, 2011 05:35
-
-
Save heavenshell/961142 to your computer and use it in GitHub Desktop.
unite.vim settings...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nnoremap [unite] <Nop> | |
nmap f [unite] | |
nnoremap [unite]u :<C-u>Unite<Space> | |
nnoremap <silent> [unite]f :<C-u>Unite -buffer-name=files file buffer file_mru< | |
CR> | |
nnoremap <silent> [unite]c :<C-u>UniteWithCurrentDir -buffer-name=files buffer | |
file_mru bookmark file<CR> | |
nnoremap <silent> [unite]o :<C-u>Unite outline<CR> | |
nnoremap <silent> [unite]O :<C-u>Unite outline -auto-preview<CR> | |
autocmd FileType unite call s:unite_my_settings() | |
function! s:unite_my_settings() | |
" Overwrite settings. | |
nmap <buffer> <ESC> <Plug>(unite_exit) | |
imap <buffer> jj <Plug>(unite_insert_leave) | |
imap <buffer> <C-w> <Plug>(unite_delete_backward_path) | |
" Start insert. | |
let g:unite_enable_start_insert = 1 | |
endfunction | |
call unite#set_substitute_pattern('file', '^@@', '\=fnamemodify(expand("#"), ":p | |
:h")."/*"', 2) | |
call unite#set_substitute_pattern('file', '^@', '\=getcwd()."/*"', 1) | |
call unite#set_substitute_pattern('file', '^\\', '~/*') | |
call unite#set_substitute_pattern('file', '^;v', '~/.vim/*') |
ありがとうございます。
function の外に出すように @Shougo さんに指摘して貰ったので、今は function の外に書いてます。
https://twitter.com/#!/ShougoMatsu/status/67101242198990848
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
let g:unite_enable_start_insert = 1
はFileType uniteでやると、初回起動時にstart insertしなくなりませんか?
普通にfunctionの外に書いた方がいいですよ。