Re: Need a vim "hard mode" tutorial.

2013-05-12 Thread Gary Johnson
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* thi

Re: Need a vim "hard mode" tutorial.

2013-05-12 Thread Tony Mechelynck
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

Need a vim "hard mode" tutorial.

2013-05-12 Thread DwigtArmyOfChampions
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

Re: evaluating vim functions in search mappings

2013-05-12 Thread Marc Weber
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"?

evaluating vim functions in search mappings

2013-05-12 Thread Charles Smith
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? ---

Re: Substitution gets broken when mapped

2013-05-12 Thread Sylvia Ganush
On 12 May 2013, at 22:36, tooth pik wrote: > I'd start by checking mappings as Tim suggested... But of course: I had w tied also to another mapping. I changed the mapping and all works as expected now. Thank you, Tim and Tooth Pik. Sylvia -- -- You received this message from the "vim_use"

Re: empty bufname('%') for quick fix, location list and preview window.

2013-05-12 Thread Zhao Cai
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 top-

Re: Substitution gets broken when mapped

2013-05-12 Thread Tim Chase
On 2013-05-12 15:36, tooth pik wrote: > let mapleader = ',' > nnoremap a :call StripTrailingWhitespace() > function! StripTrailingWhitespace() > let _s=@/ > let l = line(".") > let c = col(".") > %s/\s\+$//e > let @/=_s > call cursor(l, c) > endfunction I too thought about

Re: Substitution gets broken when mapped

2013-05-12 Thread tooth pik
On Sun, May 12, 2013 at 10:01:37PM +0200, Sylvia Ganush wrote: > 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 su

Re: Substitution gets broken when mapped

2013-05-12 Thread Tim Chase
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 w :%s/\s\+$// In theory, this *should* work (though the extra space before the "" can be

Substitution gets broken when mapped

2013-05-12 Thread Sylvia Ganush
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 w :%s/\s\+$