Question for Vim users: how do you get used to hitting Esc very often? I know some switch Cap with Esc but still clunky.
Caps Lock being Esc is so convenient that I use Esc a lot more outside of Vim too. Stop the browser loading a page? a quick pinky tap on the caps lock. Take the focus out of a text field (so I can use my Vimium commands)? tap the caps lock. Decide not to save or open that file after all? caps lock's got your back. The remapping was originally for Vim, but now at least a third of my Esc usage is outside of it.
Vim – Minimal Setup Explained
91–100 of 114 posts
Re: Vim – Minimal Setup Explained
#92Question for Vim users: how do you get used to hitting Esc very often? I know some switch Cap with Esc but still clunky.
Re: Vim – Minimal Setup Explained
#93Question for Vim users: how do you get used to hitting Esc very often? I know some switch Cap with Esc but still clunky.
I’ve never found a problem with it. Right at the corner, it’s easy to hit with my left ring finger, sitting perfectly at a comfortable distance (based on where I rest my hands) for a slap in that general direction. (I use my Caps Lock as Backspace. Backspace near the top right is vastly less comfortable to reach than Escape in the top left.)
People really like the home row but (1) I think it is fine to leave it once in a while and (2) my joints don’t like stay in a very static position for too long in any case.
Re: Vim – Minimal Setup Explained
#94Earlier quoted context omitted.
Esc is probably the easiest key to hit in the keyboard? Tied with bottom left ctrl/fn and whatever you have in the other two corners. As in it's the easiest to misclick without accidentally hitting other keys
The easiest are F and J, the home keys where your index fingers rest. The more you have to "reach away", the harder it is to always correctly reset your hand.
Re: Vim – Minimal Setup Explained
#95See also `:h defaults.vim-explained` ( https://vimhelp.org/usr_05.txt.html#05.3 ) which now comes by default. You can either copy the settings you are interested in or source it entirely in your vimrc file: source $VIMRUNTIME/defaults.vim --- Here's some more related resource links: * stackoverflow: useful .vimrc tips - ( https://stackoverflow.com/q/164847/4082052 ) * vi.stackexchange: How do I debug my vimrc file? -…
Please, no. Someone else's vimrc is the last thing newcomers need.
Re: Vim – Minimal Setup Explained
#96The only thing I've really struggled with when trying to get into using vim full-time is navigating my project. In VSCode I basically hit CTRL+SHIT+F -> "portion_of_a_function_name_or_something" constantly. I abuse the heck out of global search. Is there a way of navigating your project in vim that's similar/easier? How do vim people quickly navigate their code without going "what was the name of that file with that…
Historically, people used :grep and the quicklist to jump between project files based on abitrary strings and Ctags to generate a language specific index of functions, variables which you can jump to. These days people generally use some kind of fuzzy finder plugin thats basically the same as the vscode experience. Exactly which one you use depends on various factors, but Telescope and Fzf are two big names and both…
This x100. I switched to neovim+pylsp a few months ago, and it's been an absolute delight. I use lspconfig [1] and pyslp [2] since most of my time is spent developing Python code. Not only can I navigate more quickly and easily, I also find myself catching more silly errors before run-time due to better linting from the lsp.
It used to be that I wouldn't use vim beyond quick edits on single files. Although I still prefer to use vim style bindings in IDEs, I can go much further before I feel the need to fire up an IDE in the first place.
Re: Vim – Minimal Setup Explained
#97Question for Vim users: how do you get used to hitting Esc very often? I know some switch Cap with Esc but still clunky.
I use `jk` or `jj` instead of esc. Its so much easier imap jj
Re: Vim – Minimal Setup Explained
#98Earlier quoted context omitted.
Quite apart from the fact that many (most?) vim short forms have long form equivalents, and vim has autocomplete - this argument feels misguided to me, mostly because I don't see why it would be limited to just vim. It seems natural, if you hold such a position, to also advocate abandoning CLIs like `ls`, `cd`, `jq`, `aws`, et al? - and I would despise having to put up with stuff like: $ change-directory foo/bar $ am…
Looks just like Powershell.
Re: Vim – Minimal Setup Explained
#99Earlier quoted context omitted.
Aside from the advice mentioned (I bind caps to escape), I find that beginners use escape waaaay more often than is necessary because they aren't using all the commands at their disposal. For example, entering insert mode to delete some characters instead of using d+motion or x. Or entering insert mode to add indentation instead of using the = operator. It would take too long to enumerate all the cases where there is…
Thanks. This is helpful. I never use those shortcuts and yes most of my Esc are for indentation and deletion.
Re: Vim – Minimal Setup Explained
#100Earlier quoted context omitted.
I relate quite heavily to this when using vi to do all my git-related activities. git rebase -i ... followed by ↓dw ↓←dw ↓←dw ↓←dw ↓←dw ↓←dw i s ↓s ↓s ↓s ↓s ↓s because I keep forgetting :s/pick/s/g is a thing i, a, :q, :wq, dd, xdd, and D are all the ones I remember, but cutting/yanking pasting is still something I don't have the muscle memory for. Shift+G takes me to the bottom of a file, but I don't know how to get…
I'm guessing you want :%s/^pick/s/ to replace "pick" at the start of line with "s" on all lines? If you execute it once in vim you can recall it later with just typing :%↑ and confirm with Enter. As for the top of the file: gg I use the mnemonic "go go line" (as in Inspector Gadget's "go go gadget") and since you can prefix it with a line number (e.g. 4gg to go to line number 4), leaving it out gets me as close to li…