Commit f694b092e2aa8a50d60d676ab854a4af36e253c5

Remove Ctrl-W mapping
Vim's behaviour of this key is more useful.
Author: xaizek
Author date (UTC): 2012-06-11 18:19
Committer name: xaizek
Committer date (UTC): 2012-06-11 18:19
Parent(s): ccc08b4cf04340375f80e12e5d32245ddd2ab582
Signing key:
Tree: 00e60a62dba119d6be4102b646fdd8e6f878a375
File Lines added Lines deleted
doc/emacscommandline.txt 0 2
plugin/emacscommandline.vim 0 22
File doc/emacscommandline.txt changed (mode: 100644) (index aac0204..5a67796)
... ... DELETION *emacscommandline-deletion*
32 32 (i.e. the same behaviour as in Bash: unix-line-discard) (i.e. the same behaviour as in Bash: unix-line-discard)
33 33 *META-D* delete word under cursor *META-D* delete word under cursor
34 34 *META-Backspace* delete word backwards *META-Backspace* delete word backwards
35 *CTRL-W* delete backwards to previous white-space character
36 (i.e. the same behaviour as in Bash: unix-word-rubout)
37 35
38 36 HISTORY *emacscommandline-history* HISTORY *emacscommandline-history*
39 37
File plugin/emacscommandline.vim changed (mode: 100644) (index e9abd79..f0b5b1f)
... ... function! <SID>KillWord()
142 142 return l:ret return l:ret
143 143 endfunction endfunction
144 144
145 cnoremap <C-W> <C-\>e<SID>DeleteBackwardsToWhiteSpace()<CR>
146 function! <SID>DeleteBackwardsToWhiteSpace()
147 call <SID>saveUndoHistory(getcmdline(), getcmdpos())
148 let l:loc = strpart(getcmdline(), 0, getcmdpos() - 1)
149 let l:roc = strpart(getcmdline(), getcmdpos() - 1)
150 if (l:loc =~ '\v\S\s*$')
151 let l:rem = matchstr(l:loc, '\v\S+\s*$')
152 elseif (l:loc =~ '\v^\s+$')
153 let @c = l:loc
154 call setcmdpos(1)
155 return l:roc
156 else
157 return getcmdline()
158 endif
159 let @c = l:rem
160 let l:pos = getcmdpos() - strlen(l:rem)
161 let l:ret = strpart(l:loc, 0, strlen(l:loc) - strlen(l:rem)) . l:roc
162 call <SID>saveUndoHistory(l:ret, l:pos)
163 call setcmdpos(l:pos)
164 return l:ret
165 endfunction
166
167 145 cnoremap <Esc><BS> <C-\>e<SID>BackwardKillWord()<CR> cnoremap <Esc><BS> <C-\>e<SID>BackwardKillWord()<CR>
168 146 cmap <M-BS> <Esc><BS> cmap <M-BS> <Esc><BS>
169 147 function! <SID>BackwardKillWord() function! <SID>BackwardKillWord()
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vim-emacscommandline

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vim-emacscommandline

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master