We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not sure how I haven't noticed this before, but...
...can it take into account current indent level?
The text was updated successfully, but these errors were encountered:
I didn't think about that since I use an autoformat on save that restore the indentation. I'll look into it!
Sorry, something went wrong.
If that is of any help, carved out of my old Vim config:
" Insert cut marker (https://stackoverflow.com/a/59291748) function Cut() abort if &textwidth execute "normal! mg" " let l:str = input('Char: ') let l:str = '-' .s/\m\(\S\+\)$/\1 /e " Add space after content (if present). " Calculate how many repetitions will fit. let l:lastcol = col('$')-1 " See :h col(). if l:lastcol > 1 let l:numstr = float2nr(floor((&textwidth-l:lastcol)/len(l:str))) else let l:numstr = float2nr(floor(&textwidth/len(l:str))) endif if l:numstr > 0 set lazyredraw .s/\m$/\=(repeat(l:str, l:numstr))/ " Append repeated pattern. execute "normal! `g" :delmarks g set nolazyredraw endif else echohl WarningMsg echom "Cut requires nonzero textwidth setting" echohl None endif endfunction
LudoPinelli
No branches or pull requests
Not sure how I haven't noticed this before, but...
recording.mp4
...can it take into account current indent level?
The text was updated successfully, but these errors were encountered: