Comments (5)
Another solution here:
nmap gcc <Plug>(caw:hatpos:toggle:operator)_
xmap gcc <Plug>(caw:hatpos:toggle:operator)
This is .
command repeatable. Note you need vim-operator-user
.
from caw.vim.
@tyru, same issue. 5gcc.
I'm currently using this technique: (same thing, but native?)
nnoremap <silent> <Plug>(caw:range:toggle) :<C-u>call <SID>cawRangeToggle()<CR>
function! s:cawRangeToggle() abort
if v:count > 1
let winView = winsaveview()
execute "normal V". (v:count - 1) ."j\<Plug>(caw:hatpos:toggle)"
call winrestview(winView)
else
execute "normal \<Plug>(caw:hatpos:toggle)"
endif
endfunction
from caw.vim.
This is surely missing thing,
but if you turn on let g:caw_operator_keymappings = 1
and install kana/vim-operator-user,
you can do gcc5j
to comment out next 5 lines.
Do you want to do 5gcc
? or gcc5j
is enough?
from caw.vim.
g:caw_operator_keymappings = 1
Hi @tyru, sorry for the late reply. I was not aware of this setting, I think it works for now. I do prefer 5gcc
however, because it's slightly faster; using gcc5j
, it seems a simple line comment now requires gcc0
. For now, I think Alex's solution works best for me.
Thanks!
from caw.vim.
ah, it needs vim-operator-user, but very neat :)
from caw.vim.
Related Issues (20)
- JSON "comments"
- Toggle does not work when using nvim-tree-sitter
- Comments in vue file inconsistent after first template element HOT 1
- Can't comment blank line with default configuration g:caw_hatpos_skip_blank_line = 0
- Doesn't comment current line when lazy loading it and set remembering last cursor location
- how can i use it? HOT 1
- toggle caw error HOT 2
- Join undo history when inserting comment
- Join repeat history when inserting comment
- weird case with context filetype
- fileType=dosbatchの時、トグルとコメント解除が動作しない
- "Press Enter or type command to continue" prompt at uncomment multi lines
- Use `#` instead of `"` in Vim9 script HOT 2
- Incorrect comments for 'typesriptreact'
- uncomment work unexpectly when single line has multi warp comment
- E117: Unknown function: caw#keymapping_stub
- [feature] b:caw_dollarpos_sp_left HOT 1
- caw.vim can't works well with treesitter HOT 1
- Error on uncomment HOT 1
- caw.vim can't works well in markdown file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caw.vim.