Hello.
I'm lost: one same substitution command works fine if executed from the
command line, but gets broken if executed via a mapping.
To remove trailing spaces I do:
:%s/\s\+$//
And it works perfectly. Since it's such a useful command I add this
mapping to my .vimrc:
nmap leaderw
On 2013-05-12 22:01, Sylvia Ganush wrote:
To remove trailing spaces I do:
:%s/\s\+$//
And it works perfectly. Since it's such a useful command I add this
mapping to my .vimrc:
nmap leaderw :%s/\s\+$// cr
In theory, this *should* work (though the extra space before the
cr can be
On 2013-05-12 15:36, tooth pik wrote:
let mapleader = ','
nnoremap Leadera :call StripTrailingWhitespace()CR
function! StripTrailingWhitespace()
let _s=@/
let l = line(.)
let c = col(.)
%s/\s\+$//e
let @/=_s
call cursor(l, c)
endfunction
I too thought about the
Hello, :)
`bufname('%')` for quickfix, location list and preview window are empty in my
environment( MacVim ). Is it a bug? or by design? Do you have the same issue?
or just me?
Thanks if you can give me a hint.
Zhao
--
--
You received this message from the vim_use maillist.
Do not
In order to be able to go to the next command in python, I'd like to
have a mapping as follows, but I can't get it to work:
map ]0 /^\s\{0,^R=wincol()}\S^M
I'm not getting the evaluation correct. Can someone help?
Excerpts from Charles Smith's message of Sun May 12 12:08:15 +0200 2013:
In order to be able to go to the next command in python, I'd like to
have a mapping as follows, but I can't get it to work:
map ]0 /^\s\{0,^R=wincol()}\S^M
Can you retry telling us what you mean by next command?
I've been struggling along with Vim's hard mode plugin that's supposed to
train you to use the good habits instead of the bad habits that eventually
will make you program better and faster. OK, I know what the bad habits are,
since they've been disabled (hjkl, backspace, and a few other
On 13/05/13 02:11, DwigtArmyOfChampions wrote:
I've been struggling along with Vim's hard mode plugin that's supposed to train you to use the good
habits instead of the bad habits that eventually will make you program better and faster. OK, I know what the
bad habits are, since they've been
On 2013-05-13, Tony Mechelynck wrote:
Vim is about Choice. Vim is about having several different ways
(suiting different people) to achieve the same results. If some
plugin is disabling a lot of keystrokes (including hjkl and
Backspace, for X-sake!) just to make you type the way *they* think