以ä¸ã§æ¸ããæ¹æ³ã¯è¯ããªãããã§ã. æå¾ã®è¿½è¨ãå¿ ãåç §ãã¦ä¸ãã.
ããã«ã¡ã¯. 端æ«vimãã使ããªãè
ã§ã.
åé¡ç¹: 端æ«vimã®æ¿å
¥ã¢ã¼ãã§ç¢å°ãã¼ãæã¤ã¨ãããªã
解決ç: ãã¼ãã«ã¢ã¼ãã§ã®O[A-D]ã, æ¿å
¥ã¢ã¼ãã«æ»ããã¼ã«ããããã
Dã¨ãå
¥ã£ã¦ãã¾ãã®ã¯, ä¾ãã°å·¦ç¢å°ã¯<ESC>ODã£ã¦ãªã£ã¦ããã.
ããªãã¡,
- æ¿å ¥ã¢ã¼ããããã¼ãã«ã¢ã¼ãã«æ»ã
- ãã¼ãã«ã¢ã¼ãã®Oã§ä¸è¡ä¸ã«æ°ããè¡ãä½ãæ¿å ¥ã¢ã¼ãã«ç§»åãã.
- Dãæ¿å ¥ãã
ã¨ãã3ã¤ã®æ®µéã§, Dãæ¿å
¥ããã.
ãã®å ´å, ãã¼ãã«ã¢ã¼ãã§ã®ODããæ¿å
¥ã¢ã¼ãã«æ»ã+Leftãã«ãããããã°è¯ã.
nnoremap OA gi<Up> nnoremap OB gi<Down> nnoremap OC gi<Right> nnoremap OD gi<Left>
giã¨ããã®ã¯, ãã¼ãã«ã¢ã¼ãã«æ»ãåã®ç¬éã®æ¿å
¥ä½ç½®ã«æ»ããããã³ã°.
詳ããã¯:h gi.
ã©ããã¦iã¨ãaã¨ããããã¡ãã¨ããã®ã¯, å®éã«ããã§mapãã¦ç¢ºèªãã¦ã¿ã¦ä¸ãã.
thincaããã«Lingrã§`^ã£ã¦ããã®ãæãã¦ããã ãã. help `^ãè¦ã¦, giãè¦ã¤ãã¾ãã.
ãããã¨ããããã¾ã.
(å¾, <ESC>OAã¨ããä½ãã«ãããããã®ã¯ã¨ã¦ãè³¢ãããæ¹ã¨ã¯ãããªã)
æ´ãªãåé¡ç¹: neocomplcacheã®è£å®ããã¡ãã¡çºåãã¦ããã
CursorMovedIã, CursorHoldIãã©ã£ã¡ãã§çºåãã¦ãã¾ã.
ç¢å°ãã¼ã§åãã¦ããéä¸ã¯è£å®ããªãã§ã»ãã.
解決ç: neocomplcache#cancel_popupã使ã
function! s:goback_insert(key) return "gi" . a:key . neocomplcache#cancel_popup() endfunction nnoremap <expr> OA <SID>goback_insert("\<Up>") nnoremap <expr> OB <SID>goback_insert("\<Down>") nnoremap <expr> OC <SID>goback_insert("\<Right>") nnoremap <expr> OD <SID>goback_insert("\<Left>")
Home, End, Del, PageUp, PageDownãããããH, F, 3~, 5~, 6~ã¿ããã«ãªã£ã¦ãã¾ã.
次ã§è§£æ±ºã§ãã.
nnoremap <expr> OF <SID>goback_insert("\<End>") nnoremap <expr> OH <SID>goback_insert("\<Home>") nnoremap <expr> [3~ <SID>goback_insert("\<Del>") nnoremap <expr> [5~ <SID>goback_insert("\<PageUp>") nnoremap <expr> [6~ <SID>goback_insert("\<PageDown>")
ãã ã, ãã¼ãã«ã¢ã¼ãã®Oãæ»ã¬ã®ã§, Oããã使ã人ã¯æ³¨æ.
ç§ã¯Oã¯ã»ã¨ãã©ä½¿ããªãããããã®ã ãã©(oããã使ã).
æè¿, æ¿å
¥ã¢ã¼ãã§ç§»åããã®ã«ã¯ã¾ã£ã¦ã.
大ä½ã¯Emacsã®ãã¼ãã¤ã³ããåèã«ãã¦ãã.
Vimmerã¨ãã¦ããã¾ããè¡çºãããããªã.
ã§ãçµæ§ä½¿ããããã¦æ
£ããã¨ã¤ãã¤.
å®éã¤ãã¤ã移åãéããç·¨éãé«éã«ãªã.
æ¿å
¥ã¢ã¼ãã§åããã¼ãã¤ã³ãã®è¨å®ãè¼ãã¦ãã.
imap <expr><C-o> neosnippet#expandable_or_jumpable() ? \ "\<Plug>(neosnippet_expand_or_jump)" : "\<ESC>o" function! s:cancel_popup(key) return a:key . neocomplcache#cancel_popup() endfunction inoremap <expr> <C-p> <SID>cancel_popup("\<Up>") inoremap <expr> <C-n> <SID>cancel_popup("\<Down>") inoremap <expr> <C-b> <SID>cancel_popup("\<Left>") inoremap <expr> <C-f> <SID>cancel_popup("\<Right>") inoremap <expr> <C-e> <SID>cancel_popup("\<End>") inoremap <expr> <C-a> <SID>cancel_popup("\<Home>") inoremap <expr> <C-d> <SID>cancel_popup("\<Del>") inoremap <expr> <C-h> <SID>cancel_popup("\<BS>") inoremap <expr> <Up> <SID>cancel_popup("\<Up>") inoremap <expr> <Down> <SID>cancel_popup("\<Down>") inoremap <expr> <Left> <SID>cancel_popup("\<Left>") inoremap <expr> <Right> <SID>cancel_popup("\<Right>") function! s:goback_insert(key) return "gi" . a:key . neocomplcache#cancel_popup() endfunction nnoremap <expr> OA <SID>goback_insert("\<Up>") nnoremap <expr> OB <SID>goback_insert("\<Down>") nnoremap <expr> OC <SID>goback_insert("\<Right>") nnoremap <expr> OD <SID>goback_insert("\<Left>") nnoremap <expr> OF <SID>goback_insert("\<End>") nnoremap <expr> OH <SID>goback_insert("\<Home>") nnoremap <expr> [3~ <SID>goback_insert("\<Del>") nnoremap <expr> [5~ <SID>goback_insert("\<PageUp>") nnoremap <expr> [6~ <SID>goback_insert("\<PageDown>")
ã¨ãããã, æ¿å
¥ã¢ã¼ãã§ç¢å°ãã¼ãæ¼ãã¦èª¤çãããã¨ã¯ãªããªã.
ããç¢å°ãã¼ãnopã«mapãããããªç¡¬æ´¾ãªäººãªãã°, nnoremap OA giã¿ããã«ãã¦ããã¨è¯ãã ãã.
端æ«vimã§å°ã£ã¦ã人ã¯ã試ããã.
(追è¨)neocomplcacheãåæã«è£å®ãããã¨ããã®ãæããã«ã¯
次ã®è¨å®ã§ãæããããããã§ã. (確èªãã¦ããªããã©)
@itchyny URL èªåè£å®ãçºåãã件ã«é¢ãã¦ã¯ãg:neocomplcache_enable_insert_char_pre=1ã¨ããã°OKã§ããè¦æãé常ã«å¤ãããFAQã«æ¢ã«è¼ã£ã¦ãã¾ãã
2013-06-24 17:03:52 via web to @itchyny
let g:neocomplcache_enable_insert_char_pre=1
ãã®è¨äºã®æå³ãåæ¸ãã¦ãã¾ã£ã...
Shougoãããããã¨ããããã¾ã.
ã¾ã¨ããã¨, 次ã®è¨å®ã§ååã§ã.
let g:neocomplcache_enable_insert_char_pre = 1 inoremap <C-p> <Up> inoremap <C-n> <Down> inoremap <C-b> <Left> inoremap <C-f> <Right> inoremap <C-e> <End> inoremap <C-a> <Home> inoremap <C-d> <Del> inoremap <C-x> <Del> inoremap <C-h> <BS> inoremap <Up> <Up> inoremap <C-_> <ESC>ugi inoremap <C-\> <ESC>ugi nnoremap OA gi<Up> nnoremap OB gi<Down> nnoremap OC gi<Right> nnoremap OD gi<Left> nnoremap OF gi<End> nnoremap OH gi<Home> nnoremap [3~ gi<Del> nnoremap [5~ gi<PageUp> nnoremap [6~ gi<PageDown>
è¿½è¨ (2014/01/12)
k_takataãããh_eastããã«ææãåãã¾ãã.
ãããã³ã°ã§ããæ¹æ³ã¯è¯ããªãããã§ã.
vim-jpã®åãè¾¼ã¿TLãçºãã¦ãã¨ã @itchyny ããã® URL ãè¦ã¦ã人ãçµæ§ãããããããã³ã°ã§ä½ã¨ãããã®ã§ã¯ãªããã¾ã㯠URL ã試ãã¹ããªæ°ãã
2014-01-11 11:28:17 via web
.vimrcã«ããæ¸ãã°ç«¯æ«ã®ã«ã¼ã½ã«ãã¼ã¢ã¼ãããã¼ãã«ãã¢ããªã±ã¼ã·ã§ã³ãã«é¢ä¿ãªãã¡ããã¨åã(^[ã¯<C-V><Esc>ã§å ¥å)set <xUp>=^[OAset <xDown>=^[OBset <xRight>=^[OCset <xLeft>=^[OD#vim
2013-06-26 20:15:05 via web
set notimeout set ttimeout set timeoutlen=100
ãããã¯
set <xUp>=^[OA set <xDown>=^[OB set <xRight>=^[OC set <xLeft>=^[OD
ã¨ããè¨å®ã§è§£æ±ºãã¾ã. (^[ã¯<C-V><Esc>)
ãã ã,
if has('unix') && !has('gui_running') inoremap <silent> <ESC> <ESC> endif
ã¨ããè¨å®ãæ¸ãã¦ãã人ã¯, ãããæ¶ããªãã¦ã¯ããã¾ãã.
è¦ã¯, æ¿å
¥ã¢ã¼ãã§ã®<ESC>ã¸ã®ãããã³ã°ã¯è¯ããªãã®ã§ã.
(ãã©ã°ã¤ã³ã<ESC>ã«ãããã³ã°ãã¦ããå ´åã¯, ä½è
ãæ®´ãã«è¡ãã¾ããã)
ãã®è¨å®ã¯, ããã©ã«ãã®timeoutlenã1000ã§ããããã«, ã¨ã¹ã±ã¼ããã¼ã§ç´ãã«ãã¼ãã«ã¢ã¼ãã«æ»ããªãã¨ããçç±ã§ä½¿ãããè¨å®ã§ã.
ttimeoutãè¨å®ããttimeoutlenãçãããã¨, ãã®è¨å®ãä¸è¦ã«ãªãã¨ããããã§ã.