Skip to main content
edited tags
Link
statox
  • 50.6k
  • 19
  • 153
  • 231
added 7 characters in body
Source Link

I'm kinda new to vim, and I wanted to play with macros.

I wrote a bunch to fit with my previous muscle memory, including thosethis one:

imap <C-j> $a<CR><ESC>==a
imap <C-k>i> 0i<CR><ESC>k==a<ESC>m`$a<CR><ESC>==k``i

The intended behavior was to create a line below/above the cursor and edit it, but keep editing the line. First it never really worked, and second, I could isolate this line of being responsible of something strange:

As soon as I add it, the Tab button is having exactly the same behavior as the CTRL+kCTRL+i button in edition mode. I may miss something obvious, would anyone have any idea?

THanks

I'm kinda new to vim, and I wanted to play with macros.

I wrote a bunch to fit with my previous muscle memory, including those:

imap <C-j> $a<CR><ESC>==a
imap <C-k> 0i<CR><ESC>k==a

The intended behavior was to create a line below/above the cursor and edit it. First it never really worked, and second, I could isolate this line of being responsible of something strange:

As soon as I add it, the Tab button is having exactly the same behavior as the CTRL+k button. I may miss something obvious, would anyone have any idea?

THanks

I'm kinda new to vim, and I wanted to play with macros.

I wrote a bunch to fit with my previous muscle memory, including this one:

 imap <C-i> <ESC>m`$a<CR><ESC>==k``i

The intended behavior was to create a line below the cursor, but keep editing the line. First it never really worked, and second, I could isolate this line of being responsible of something strange:

As soon as I add it, the Tab button is having exactly the same behavior as the CTRL+i button in edition mode. I may miss something obvious, would anyone have any idea?

THanks

Source Link

Unintended tabulation bind

I'm kinda new to vim, and I wanted to play with macros.

I wrote a bunch to fit with my previous muscle memory, including those:

imap <C-j> $a<CR><ESC>==a
imap <C-k> 0i<CR><ESC>k==a

The intended behavior was to create a line below/above the cursor and edit it. First it never really worked, and second, I could isolate this line of being responsible of something strange:

As soon as I add it, the Tab button is having exactly the same behavior as the CTRL+k button. I may miss something obvious, would anyone have any idea?

THanks