On Oct 27, 12:26 pm, "Magnus ..." <[email protected]> wrote:
> Hi all,
> I would like { and } to trigger
> indenting and outdenting, and I would like >> and << to work for all
> lines - including lines starting with # (comments). An example line
> looks like this:
>
> I've tried using smartindent, but it seems impossible to configure
> that to handle # using >>.

I resolved this myself, perhaps not in the prettiest way, but it seems
to work. The solution: Use smartindent, but use mappings to disable it
before indenting using > and >>

nnoremap <tab>       :set nosmartindent<cr>>>:set smartindent<cr>
vnoremap <tab>  <esc>:set nosmartindent<cr>gv>:set smartindent<cr>gv

Best,
Magnus

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to