2,969 reputation
11434
bio website dotancohen.com
location
age 36
visits member for 2 years, 11 months
seen 2 days ago

Oct
26
comment How to escape vim keywords in mappings?
Very cool, thank you! There are so many ways to fry eggs with VIM!
Oct
26
comment How to escape vim keywords in mappings?
Thank you Romainl! Always good to learn from you!
Oct
26
comment How to escape vim keywords in mappings?
Thank you, that ties in with the mention of "very magic" in the other thread. I also had to double up the `` escape characters on the pipes as well. Please post your comment as an answer so that I could accept it. Thanks!
Oct
26
comment How to have ESC also cancel CAPS if CAPS is enabled?
Great, thanks. I had intended to google that later once I get some other issues taken care of.
Oct
26
comment How to have ESC also cancel CAPS if CAPS is enabled?
Changing that to a mapping was an exercise in experimentation. Here is the format, for those will will follow in my footsteps: noremap <leader>s <Esc>:s/\v<select>\|<from>/\U\0/g. Only the pipes need backslashes, in contrast to all the info that I was finding on Google which suggested that the `, <` , and > characters should all be escaped. I wonder if that is due to my environment or other settings, though I don't see anything relevant.
Oct
26
comment How to have ESC also cancel CAPS if CAPS is enabled?
The following form is perfect: :s/\v<where>|<select>|<delete>|<from>/\U\0/g. Thanks! As is obvious, I will select trideceth's solution as it does answer the question and it much broader is scope. But I do love this trick and I see this becoming a common tool in my box. Thank you Romain!
Oct
26
comment How to have ESC also cancel CAPS if CAPS is enabled?
Yes, it is too brutal and I've had to trim it down quite a bit. I'm now trying to get it to only match whole words but VIM regex is a bit different than PCRE. However, it is a great tool to have for the common one-liner SQL keywords such as INSERT, INTO, TABLE, WHERE, SELECT, DELETE, FROM, LIMIT, ORDER, BY, ASC, DESC, SET, UPDATE. As soon as I've got this whole-word issue sorted out I'm mapping it to leader-s. Thanks!
Oct
26
comment How to have ESC also cancel CAPS if CAPS is enabled?
Thanks, I see your edit that even mentions how to do that. I'm fiddling with it now, thank you!
Oct
26
comment How to have ESC also cancel CAPS if CAPS is enabled?
Thank you trideceth, that is a great answer. I don't see from casual googling that there exist either an if flow control in xbindkeys, nor a "Disable Capslock" code that would have no effect if Capslock is not set. I'll keep looking and update if I find either of those.
Oct
26
comment How to have ESC also cancel CAPS if CAPS is enabled?
That might work! It's not finding anything as posted, I'll google how to get the regex to work and I'll post back. Thanks, Romain!
Oct
18
comment Ascii-art graphs in Linux
@Karan: Doing the bars vertically is trivial, I would prefer something vertical. I could write it myself, but if the software already exists (apparently it does: gnuplot) then I don't want to reinvent the wheel.
Oct
18
comment Ascii-art graphs in Linux
@Praveen: thank you, I had no idea that gnuplot could output ascii graphs. Nice!
Oct
17
comment Linux: Install Skype 4.0 but keep 2.2?
After four months? I don't even recall what I ate four hours ago! It wasn't critical though, I see that your google-fu is more powerful than my own!
Oct
15
comment Abbreviations override in comments and quoted text
Thanks. I've got some reading to do!
Oct
15
comment Abbreviations override in comments and quoted text
I was able to read about synIDattr and the other bits in the help, but when reading the help page h ==? it looks like I was getting the help text for ==. What is the ==? operator? Thanks.
Oct
15
comment Abbreviations override in comments and quoted text
You are right, I have other imappings as well, such as {{. In any case, your solution works perfect. Thank you!
Oct
14
comment Abbreviations override in comments and quoted text
Thank you! I will play around with this solution and see what I can get working.
Oct
14
comment Abbreviations override in comments and quoted text
Thanks. The Python bit is very secondary, I've removed it from the question as I see that it is distracting from the real issue. In any case I've upvoted. Thanks.
Oct
2
comment Is it possible to “virtualize” an existing PC?
Though very informative and helpful, this suggestion should be a comment and not an answer. It does not answer the question.
Sep
20
comment Search for text of register in function
Great, thank you!