Timeline for Why does remapping <Esc> make the cursor jump?
Current License: CC BY-SA 3.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 19, 2016 at 19:42 | history | edited | statox | CC BY-SA 3.0 |
Remove a duplicated word
|
Mar 19, 2016 at 14:39 | vote | accept | CommunityBot | ||
Mar 19, 2016 at 7:48 | comment | added | statox |
If you read Sato's link you'll see "Some command definitions allow comments in their context so set ai " Set &autoindent works, treating " just like newline or bar, but this does not apply to :let ."... In some cases it is possible to add comments at the end of the line but I think I've never seen a good .vimrc using them, so I would advise you not to use them.
|
|
Mar 19, 2016 at 4:39 | comment | added | user6649 |
Thank you, now I know that it wasn't a problem with vim-script highlight in my theme !SCRNSHT Is it OK to keep comments inline for the settings other than inoremap , or it's safer to add newlines to the whole .vimrc ?
|
|
S Mar 18, 2016 at 22:13 | history | edited | statox | CC BY-SA 3.0 |
added 31 characters in body
|
Mar 18, 2016 at 18:18 | review | Suggested edits | |||
S Mar 18, 2016 at 22:13 | |||||
Mar 18, 2016 at 15:03 | history | edited | statox | CC BY-SA 3.0 |
Thanks Sato!
|
Mar 18, 2016 at 15:02 | comment | added | Sato Katsura |
Sadly \r doesn't work in all contexts, f.i. you have to use \n in search patterns. But it does work here.
|
|
Mar 18, 2016 at 14:59 | comment | added | statox |
@SatoKatsura: Pretty interesting link and thanks for \r I'm used to C \n and couldn't remember which character to use in Vim.
|
|
Mar 18, 2016 at 14:56 | comment | added | Sato Katsura |
Yon can also replace ^M in replacement strings by \r .
|
|
Mar 18, 2016 at 14:55 | history | edited | statox | CC BY-SA 3.0 |
added 231 characters in body
|
Mar 18, 2016 at 14:54 | comment | added | Sato Katsura | For what it's worth, this post explains explains exactly what's going on with comments in VimL. | |
Mar 18, 2016 at 14:32 | history | edited | statox | CC BY-SA 3.0 |
added 439 characters in body
|
Mar 18, 2016 at 14:16 | comment | added | statox | @fruglemonkey you're right but I don't think it is a good practice to recommand: using bar this way is -in my opinion- a potential source of bugs hard to spot. It is easy to forgot a bar and to spend a lot of time trying to figure out what is causing the problem. I think that putting comments on separate lines is safer :-) | |
Mar 18, 2016 at 14:12 | comment | added | fruglemonkey |
If you want to keep inline comments, you'll need a bar: imap jj <ESC>| " Easy escape
|
|
Mar 18, 2016 at 14:11 | history | answered | statox | CC BY-SA 3.0 |