Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore cursor column in BlankUp/BlankDown #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lifecrisis
Copy link

Using [<Space> and ]<Space> always moves the cursor to the beginning of the line.

I would prefer not to.

@tpope
Copy link
Owner

tpope commented Aug 30, 2018

I think this would be okay if it respected the 'startofline' option.

@lifecrisis
Copy link
Author

I'm not sure I follow. The 'startofline' option applies to a set of enumerated commands. I don't exactly see why a custom command needs to fit with this option.

For my case, this wouldn't help. I would like to keep the 'startofline' option on so that the enumerated commands in :h 'sol' function normally while [<Space> and ]<Space> function as in this PR. So, there's a conflict here for me.

In any case, I admire your work and my feelings won't be hurt if you close! I'll just overwrite these mappings in my vimrc file.

@lifecrisis
Copy link
Author

lifecrisis commented Oct 6, 2018

Hey, @tpope. In order to overwrite these mappings, wouldn't the s:map() call need to include the '<unique>' argument?

I just tried adding the following to my vimrc file:

nnoremap <silent> [<Space> :<C-U>call append(line('.') - 1, repeat([''], v:count1))<CR>
nnoremap <silent> ]<Space> :<C-U>call append(line('.'), repeat([''], v:count1))<CR>

These do the job when the '<unique>' argument is added to your s:map() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants