- Disable `indent-relative`
- helm-grep-do-git-grep - search only in current dir
- Set intero as default in spacemacs
- Use adaptive wrapping only in one specific major mode
- How would we overcome the sinking problem as sediment builds up around urban areas?
- Why Would an Enemy Army Retreat if they Will Die Anyway
- What is the significance of number 3?
- Who is “Bharat Mata” & why is she having Indian tricolor flag?
- Find entries that use a specific block in their Matrix field?
- Importing data through feed-me plugin, crashing
- It's a long row ahead, boys
- This could be another Riley's Riddle
- A rhyming riddle made by me, is not as good as Riley's can be
- Come to me, I'll give you rest
- What research is this similar to — Deep CNN for generating images by classifying individual pixels — not a GAN
- how to save deep learning model and test it after training?
- Metric and Binary Variable in Cluster Analysis
- what is this round black rock contained in sandstone
- Does founding a company by E-residency (in Estonia) would create a conflict with my Blue Card in Germany?
- Connecting two ESP32/ESP8266 over internet
Make vim perform function on all highlighted lines, not just first line
I am trying to get vim 7.4 to do block commenting and uncommenting of highlighted lines. I am so frustratingly close.
autocmd BufReadPost *.[ch] let b:commentChar='//'
autocmd BufReadPost *.cpp let b:commentChar='//'
autocmd BufReadPost *.py let b:commentChar='#'
autocmd BufReadPost *.*sh let b:commentChar='#'
function! Docomment ()
"make comments on all the lines we've grabbed
execute 's/^\s*/&'.escape(b:commentChar, '\/').' /e'
function! Uncomment ()
"uncomment on all our lines
execute 's/\v(^\s*)\V'.escape(b:commentChar, '\/').'\v\s*/\1/e'
function! Comment ()
"does the first line begin with a comment?
"if there's a match
if match(getline(l:line), '^\s*'.b:commentChar)>-1
echom "calling uncomment"
echom "calling docomment"