News for hackers. Stuff that matters.
Re:Vim Clutch – A hardware pedal for improved text editing (... by TheSpiceIsLife on Sunday March 11, 2018 @01:46PM (#16563950)
When I'm much older, or, for dramatic effect, perhaps on my death bed, I hope someone asks me what the most important event of my life was, or what my fondest memory is, that sort of question.

I'm going to tell them: "Remapping caps lock to delete".

Not in Vim, but system wide.

Re:Vim Clutch – A hardware pedal for improved text editing (... by nicolashahn on Sunday March 11, 2018 @01:53PM (#16563989)
Interesting. I mapped mine to ESC but I can see that being equally useful. Usually when deleting, I leave insert mode and use `d` or `x`.
Re:Vim Clutch – A hardware pedal for improved text editing (... by TheSpiceIsLife on Sunday March 11, 2018 @03:37PM (#16564405)
I should have said: I don't use Vim at all. I get by with Notepad++ for the tiny amount of G-Code editing I need to make a few tweaks to laser cutter programs.

I use AutoHotKey to remap caps lock to delete and shift + caps lock to caps lock.

Re:Vim Clutch – A hardware pedal for improved text editing (... by u801e on Sunday March 11, 2018 @02:02PM (#16564026)
Years ago, I got into the habit of using ctrl-[ to get out of insert mode instead of pressing Esc. I find having CapsLock useful for typing all-caps constants in source code when needed.
Re:Vim Clutch – A hardware pedal for improved text editing (... by caymanjim on Sunday March 11, 2018 @04:13PM (#16564549)
I map CapsLock to Ctrl, where it belongs. I've recently gotten into the habit of using Ctrl-[ for Escape, though, because I'm stuck on a MacBook with one of those horrible touchbars, and I had to turn it off to remain sane.
Re:Vim Clutch – A hardware pedal for improved text editing (... by eitland on Sunday March 11, 2018 @02:52PM (#16564227)
Can't think of a good reason to type out constants.

Don't vim have decent autocomplete?

(I mostly use it when ssh-ing into servers but figured people who code in it must have set it up as an IDE?)

Re:Vim Clutch – A hardware pedal for improved text editing (... by u801e on Sunday March 11, 2018 @04:26PM (#16564596)
> Don't vim have decent autocomplete?

It does, but it requires that the word to be autocompleted is present in one of the other loaded buffers. If you're typing out a new variable name, it won't work.

Re:Vim Clutch – A hardware pedal for improved text editing (... by eitland on Sunday March 11, 2018 @05:08PM (#16564791)
So it doesn't take libraries into account?
Re:Vim Clutch – A hardware pedal for improved text editing (... by u801e on Sunday March 11, 2018 @06:25PM (#16565062)
I was referring to the regular complete feature (rather than omnicomplete). The default setting is supposed to take included files into account, but that feature doesn't appear to work with imports in python.
Re:Vim Clutch – A hardware pedal for improved text editing (... by tcoff91 on Sunday March 11, 2018 @10:30PM (#16565864)
Not unless you use a plugin like YouCompleteMe
Re:Vim Clutch – A hardware pedal for improved text editing (... by nicolashahn on Sunday March 11, 2018 @10:38PM (#16565888)
Question for anyone who knows: is there a vim command or plugin to transform the word the cursor is under to upper/lowercase (or camelCase, kebab-case, snake_case, while we're at it)?
Re:Vim Clutch – A hardware pedal for improved text editing (... by u801e on Sunday March 11, 2018 @11:40PM (#16566063)
g~w will swith lowercase letters to uppercase ones and vice versa. gUw will change all letters in the word to uppercase. guw will change all uppercase letters in the word to lower case. See :help case for more details.

There are probably plugins to change words to camelCase, snake_case, etc, but I'm not aware of any built-in command to do that (other than manually editing it).

Re:Vim Clutch – A hardware pedal for improved text editing (... by keithnz on Sunday March 11, 2018 @04:34PM (#16564627)
I went with ctrl-[ for a bit and still do use it when I use another computer, but I find caps = esc to be so much more relaxing for the fingers.