-
Notifications
You must be signed in to change notification settings - Fork 0
Vimの命令行で[[Ctrl]]+[[C]]などで離脱したさいに,その命令を履歴に残さない #14
Copy link
Copy link
Open
Labels
機能拡張新機能の設計・実装新機能の設計・実装
Description
dotfiles/_dffiles/.config/vim/vimrc
Lines 223 to 238 in b03dd99
| " <C-c>で離脱する際,履歴を残さない | |
| " FIXME: これは不完全。 | |
| " ‘/’で検索した後<C-c>で離脱すると「histdel(...)」という語句を検索してしまう。 | |
| " やりたいのは‘/’で入力した値を消去すること。 | |
| " こ無ゾ | |
| if 0 " ここから無効 | |
| cnoremap <silent> <C-c> <End><C-u>call<Space>{-><Space>if<Space>getcmdtype()==":"<Space><Bar><Space>histdel("cmd", -1)<Space><Bar><Space>endif}<Enter> | |
| cnoremap <C-c> <C-\>eCmdHstDelX(getcmdtype())<Enter> | |
| function! CmdHstDelX(cmdtype) | |
| if a:cmdtype == ":" | |
| return histdel("cmd", -1) | |
| else | |
| return call getcmdline() | |
| endif | |
| endfunction | |
| endif " ここまで無効 |
思考はこちらで行う。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
機能拡張新機能の設計・実装新機能の設計・実装
Projects
Status
Todo