Monday, May 13, 2013

Re: evaluating vim functions in search mappings

:h indent()
returns indentation of current line.
Thus

:map <X> /^<c-r>=repeat(' ', indent(line('.')))<cr>\S<cr>
or such might do it.

A second solution would be using folding.

In the end - you should try using better search terms.

Eg googling for "indendation based movement vim"
http://stackoverflow.com/questions/896145/more-efficient-movements-editing-python-files-in-vim
http://vim.wikia.com/wiki/Move_to_next/previous_line_with_same_indentation
http://vim.wikia.com/wiki/Indenting_source_code
[...]

I didn't read them, but they might be helpful.

Try to rethink about the way you're looking for information.

Marc Weber

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: