Re: [SUGGESTION] Blank lines an the { and } keys

I use the { and } keys in Vim and ViEmu a *lot*. One thing I've been noticing about Visual Studio, though, is that it's hard to keep lines blank. In Vim and ViEmu, if you stop editing a line that has already been auto-indented without adding any text, it removes the whitespace that was inserted for that line. But given that this isn't something Visual Studio does on its own, and  I'm sure most of us using Visual Studio work on code in teams, there end up still being a lot of lines that are blank, but have leading whitespace to the current indentation level. I could pretty easily write a regex to remove all the whitespace from these lines, but I'm sure my coworkers would quickly get annoyed at all the extraneous whitespace-related checkins to the source repository. wink

I know this isn't strict Vi/Vim emulation, but would it be possible to add an option to make the { and } skip whitespace-only lines as well as just blank lines?


Re: [SUGGESTION] Blank lines an the { and } keys

Hi Justin,

I'm taking note of it and understand the need. I think the best solution will be in ViEmu 3.0 when I can (hopefully) add the possibility to customize everything via some type of scripting. Meanwhile, you can maybe use the following mappings:

:nnoremap } /^<space>*$<return>
:nnoremap { ?^<space>*$<return>

You can also add the mappings in visual mode (:vnoremap) and other modes (the docs detail all mapping options and their behavior.

You can set these in _viemurc and they will be read everytime ViEmu is started.

Let me know if this helps.




Re: [SUGGESTION] Blank lines an the { and } keys

Thanks for the suggestion Jon, I'll give that a try! smile


Re: [SUGGESTION] Blank lines an the { and } keys

You're welcome, let me know how it works!