-
Notifications
You must be signed in to change notification settings - Fork 90
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
Vim: split and join by bar? #77
Comments
In this case, the only way for it to make sense is to work on specific constructs, like if-clauses. Which I can try to implement. As you said, joining is not going to be a problem, since I can just check if the next line starts with a Right now, splitting a line just relies on being in the right place. Maybe I could do something like, "if the cursor is on or just before a Do you have any other constructs you'd like splitjoin to work on, apart from if-clauses? |
Thanks for looking into this!
Maybe this could be based on endwise's list? |
Be aware that there are cases, in which retaining the bars is the desired behaviour, such as in an (auto-) command. For example, I have this command living in my command! -buffer -bang -range -nargs=1 -complete=file Export <line1>,<line2>w! >> <args>
\| <line1>,<line2>d
\| if '<bang>' == '!'
\| call append(line('.') - 1, '\input{<args>}')
\| endif Or this autocmd in my vimrc: autocmd FileType tex,mail,pandoc if exists(':Thesaurus') | setlocal keywordprg=:Thesaurus | endif In both cases, the desired behaviour is to retain the bars while adding line-continuation characters on splitting / deleting line-continuation characters on joining. |
Would it make sense for the Vim mode to handle/use bars (
|
) to join/split?E.g. the following:
to:
So basically, it would use
|
for splitting/joining, in case there is no continuation backslash (which is handled currently).The text was updated successfully, but these errors were encountered: