TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Vim Keybindings Everywhere – The Ultimate List

235 点作者 philonoist大约 2 年前

37 条评论

LastTrain大约 2 年前
I've been using Vim for years (well, decades really...) and a couple of years ago I decided I was going to go all in and learn to do it all from the the home keys. I did the Vim snake game, daily practices, the whole nine yards. So now I am slightly more productive inside Vim and fucking type strings of j's all over everything else I use.
评论 #35827269 未加载
评论 #35821115 未加载
评论 #35823295 未加载
评论 #35821711 未加载
turtledragonfly大约 2 年前
One fun tidbit about using Vi keybindings in readline is: you can use &#x27;*&#x27; as a wildcard when searching history. You can&#x27;t do it in the default Emacs mode. I use this all the time!<p>Originally I read about this feature in a POSIX spec, noticed it did not work, and filed a bug with readline about it.<p>They fixed the bug, but since it was only mentioned in the spec for Vi mode, they did not add the feature to Emacs mode.<p>I&#x27;m glad to have done my part to make Vi mode strictly superior to Emacs mode (:
avgcorrection大约 2 年前
I really like using NeoVim for programmatic text manipulation.[1] I use Spacemacs as my main non-IDE editor and I want to reuse that basic Vim knowledge instead of having to worry about the differences between sed et al.<p>Typically I will insert a step in the pipeline like for example `nvim -Es +&#x27;:%s&#x2F;^&#x2F;go home&#x2F;&#x27; +&#x27;%p&#x27;`.<p>NeoVim rather than Vim since Vim is painful for pipeline text manipulation.<p>[1] <a href="https:&#x2F;&#x2F;vimways.org&#x2F;2018&#x2F;vims-social-life&#x2F;" rel="nofollow">https:&#x2F;&#x2F;vimways.org&#x2F;2018&#x2F;vims-social-life&#x2F;</a>
评论 #35822989 未加载
roryrjb大约 2 年前
Fails to mention my favourite text editor, Sublime Text which has an optional Vim mode built in (Vintage). I personally am using NeoVintageous[0] which allows you to run various ex commands and shell commands, as well as incorporating features from popular plugins such as vim-surround.<p>0. <a href="https:&#x2F;&#x2F;github.com&#x2F;NeoVintageous&#x2F;NeoVintageous">https:&#x2F;&#x2F;github.com&#x2F;NeoVintageous&#x2F;NeoVintageous</a>
评论 #35822015 未加载
shipscode大约 2 年前
The VSCode vim plugin gets way too much credit in my opinion. All the core tasks navigating tabs, creating new tabs, dealing with file managers, aren&#x27;t handled in that plugin nor the nvim plugin. I&#x27;ve actually built my own &quot;vim-esque&quot; hotkeys into VSCode for the core tasks that don&#x27;t pertain to editing individual files. Maybe I&#x27;ll drop it someday...
评论 #35826281 未加载
评论 #35824773 未加载
JdeBP大约 2 年前
&gt; Once your fingers have learned to speak Vim, they don&#x27;t want to speak anything else!<p>My experience is that this definitely isn&#x27;t true. Not only have I happily used all sorts of text editors in my life; I use emacs keybindings in Unix shells.<p>&gt; Search in your browser with ctrl&#x2F;cmd + f.<p>The irony is not lost that this <i>doesn&#x27;t</i> say to search in my browser using slash. (-:<p>The page is also unconsciously right that it should be talking about VIM, not vi. VIM happily recognizes the [Insert] key on my keyboard. Original Joy vi would not have. Even today, nvi ends up swapping the case of a character when I press the [Insert] key in one terminal emulator.
pmarin大约 2 年前
The standard POSIX specification describes the vi line editing mode for the shell command line. They tried to add an emacs mode but... [1]<p>&quot;In early proposals, the KornShell-derived emacs mode of command line editing was included, even though the emacs editor itself was not. The community of emacs proponents was adamant that the full emacs editor not be standardized because they were concerned that an attempt to standardize this very powerful environment would encourage vendors to ship strictly conforming versions lacking the extensibility required by the community. The author of the original emacs program also expressed his desire to omit the program. Furthermore, there were a number of historical systems that did not include emacs, or included it without supporting it, but there were very few that did not include and support vi. The shell emacs command line editing mode was finally omitted because it became apparent that the KornShell version and the editor being distributed with the GNU system had diverged in some respects. The author of emacs requested that the POSIX emacs mode either be deleted or have a significant number of unspecified conditions. Although the KornShell author agreed to consider changes to bring the shell into alignment, the standard developers decided to defer specification at that time. At the time, it was assumed that convergence on an acceptable definition would occur for a subsequent draft, but that has not happened, and there appears to be no impetus to do so. In any case, implementations are free to offer additional command line editing modes based on the exact models of editors their users are most comfortable with.&quot;<p>[1] <a href="https:&#x2F;&#x2F;pubs.opengroup.org&#x2F;onlinepubs&#x2F;9699919799&#x2F;utilities&#x2F;sh.html" rel="nofollow">https:&#x2F;&#x2F;pubs.opengroup.org&#x2F;onlinepubs&#x2F;9699919799&#x2F;utilities&#x2F;s...</a>
评论 #35820422 未加载
max182大约 2 年前
For me, it&#x27;s Emacs keybindings everywhere. Well really readline commands. I don&#x27;t use super heavily (mainly just C-a, C-b, C-e, C-p, and C-n)<p>Every computer I use, I remap control to caps lock. On my work Mac, nothing really changes since these commands work globally.<p>On my home PC, I run stock Ubuntu and use gnome-tweaks to set emacs commands.<p>These commands are so ingrained on how I edit text, I feel extremely uncomfortable without them. The deal breaker when using a new desktop environment or Windows, is whether I can get this setup up and running.<p>Does anyone have any hacks for supporting Readline out of Gnome or MacOS?
评论 #35820619 未加载
评论 #35824772 未加载
评论 #35821329 未加载
评论 #35822181 未加载
nomilk大约 2 年前
This sounds really, really dumb, but learning vim keybindings is the type of subject matter that would lend itself to &#x27;tiktok&#x27; video (&#x27;influencer&#x27; video). A video spending &lt;5 seconds per shortcut could cover ~100 shortcuts in 2-3 minutes, - much faster than reading lists or docs - with the primary advantage of this learning approach being the effortlessness of watching some silly video while flippantly killing time.<p>There&#x27;s someone who does the equivalent for hardware fixes. Okay it&#x27;s not exactly an MIT lecture but I learned a lot from it, and in such a light-hearted way.<p>Example: <a href="https:&#x2F;&#x2F;www.instagram.com&#x2F;p&#x2F;CjR24mLBcfw&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.instagram.com&#x2F;p&#x2F;CjR24mLBcfw&#x2F;</a>
评论 #35823946 未加载
tcoff91大约 2 年前
If you like vimium, there&#x27;s an app called Vimac that&#x27;s like vimium but for macOS. So you can control all kinds of apps with they keyboard like in vimium.<p><a href="https:&#x2F;&#x2F;vimacapp.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;vimacapp.com&#x2F;</a>
评论 #35819955 未加载
turtledragonfly大约 2 年前
They mention &#x27;readline&#x27; under &#x27;shells&#x27;, but it&#x27;s really more general than that. For instance, you can configure plain commandline GDB to use vim key bindings that way, and any other program that uses readline.<p>Similar can be done for &#x27;editline&#x27; (a readline alternative sometimes seen on BSD systems).
ossusermivami大约 2 年前
I use QMK and have a &quot;vim layer&quot; which translates hjkl and other keys as left-down-up-right, i.e: something like this <a href="https:&#x2F;&#x2F;github.com&#x2F;qmk&#x2F;qmk_firmware&#x2F;blob&#x2F;eab2b8faa0&#x2F;users&#x2F;twschum&#x2F;xtonhasvim.c">https:&#x2F;&#x2F;github.com&#x2F;qmk&#x2F;qmk_firmware&#x2F;blob&#x2F;eab2b8faa0&#x2F;users&#x2F;tw...</a>
a_subsystem大约 2 年前
One of my all time favs&#x2F;most used is installing Eclipse Marketplace in DBeaver so I can use vrapper in DBeaver.
评论 #35821270 未加载
taauji大约 2 年前
I am not even a power vim user but having vimium on firefox helps reduce the thought to action latency significantly.<p>If someone is able to get over the steep learning curve, having vim bindings on your fingertips is awesome.
dargscisyhp大约 2 年前
evil-mode is deprecated? What?
评论 #35819116 未加载
评论 #35818115 未加载
评论 #35818127 未加载
bediger4000大约 2 年前
There&#x27;s a fundamental difference between vi and emacs as far as keybindings go.<p>New Tricks for an Old Terminal Driver, Eric Fischer, Usenix &#x27;99, <a href="https:&#x2F;&#x2F;www.usenix.org&#x2F;legacy&#x2F;event&#x2F;usenix99&#x2F;full_papers&#x2F;Fischer&#x2F;fischer.pdf" rel="nofollow">https:&#x2F;&#x2F;www.usenix.org&#x2F;legacy&#x2F;event&#x2F;usenix99&#x2F;full_papers&#x2F;Fis...</a><p>In the &quot;User interface&quot; section, Fischer mentions that an Emacs mode is &quot;much easier&quot; to write than a vi mode, but really doesn&#x27;t give reasons.
评论 #35820482 未加载
jostiniane大约 2 年前
I use a substantial amount of those products except IDEs (I just use neovim).<p>When I was forced to use mainstream IDEs, I was thinking it&#x27;s okay, just slap vim extension and it should be the same. However, I forgot that my snippets are not there, advanced semantic navigation and refactoring is not handled the way vim does with the config and extensions, ... The conclusion was that, it will look like Vim but it&#x27;s definitely not the same.
aranchelk大约 2 年前
A Kinesis Advantage keyboard with the foot pedal to activate keypad mode and the necessary settings gets you home row navigation, &#x27;0&#x27;, &#x27;&#x2F;&#x27;, &#x27;y&#x27; -- any single key operation that can be implemented as a sequence of keys. Limited, but that&#x27;s truly every app, even for computers on which you don&#x27;t have admin&#x2F;sudo (or just don&#x27;t want to bother customizing).
评论 #35821348 未加载
评论 #35820295 未加载
sundarurfriend大约 2 年前
For file managers, I&#x27;d also recommend nnn: <a href="https:&#x2F;&#x2F;github.com&#x2F;jarun&#x2F;nnn">https:&#x2F;&#x2F;github.com&#x2F;jarun&#x2F;nnn</a><p>I found it much faster than ranger (matters especially for large folders), and the UI is pretty intuitive.
johncoltrane大约 2 年前
Those keybindings tend to deviate quite a lot in what they do from the originals, to the point of feeling almost random. Using the same keys as Vim for your custom keybindings doesn&#x27;t make them &quot;Vim Keybindings&quot;.<p>`j` to jump to next post in Reddit is not &quot;Vim-like&quot; at all for someone familiar with Vim.
评论 #35820997 未加载
评论 #35826344 未加载
xk_id大约 2 年前
Somewhat bizarre to make a list of apps with vim keybindings, when most of the functionality of those apps can be achieved already in vim, or the terminal. Obsidian in particular is a terrible experience; even with vim mode on, you still have to switch to the mouse for a lot of GUI operations.
pkulak大约 2 年前
This is a cool list. I built my own chat client a little while back to get vim bindings in the last place it was missing that I spent a lot of time: <a href="https:&#x2F;&#x2F;github.com&#x2F;pkulak&#x2F;matui">https:&#x2F;&#x2F;github.com&#x2F;pkulak&#x2F;matui</a>
hirundo大约 2 年前
I&#x27;m going to give another shot at adding a vim extension to the browser and getting it into muscle memory. I spend too much time there (mickey) mousing around. It looks like the main options on Chrome&#x2F;Brave are Vimium and cVim. Anyone have any preferences?
评论 #35819090 未加载
评论 #35824184 未加载
评论 #35822455 未加载
评论 #35824300 未加载
imbnwa大约 2 年前
Modal bindings spare users from having to effect unergonomic key chords is the real win for me
andreareina大约 2 年前
And then there&#x27;s i3wm that by default uses jkl; not hjkl because that keeps your fingers home. Between that and leaning on emacs&#x2F;readline bindings I&#x27;d probably have a bit of trouble with vim these days.
kzrdude大约 2 年前
I don&#x27;t mind switching depending on context. But I wonder how it works, how can the brain be wired for vim keys in some programs and not in others, how does it do it? I&#x27;m vaguely impressed.
评论 #35822147 未加载
therealmarv大约 2 年前
btw. macOS supports some Emacs(ish) keybindings by default <a href="https:&#x2F;&#x2F;jblevins.org&#x2F;log&#x2F;kbd" rel="nofollow">https:&#x2F;&#x2F;jblevins.org&#x2F;log&#x2F;kbd</a>
评论 #35820925 未加载
评论 #35829722 未加载
评论 #35820208 未加载
评论 #35821149 未加载
dorfsmay大约 2 年前
It should be noted that a lot of Linux&#x2F;Unix programs still support the variables EDITOR and VISUAL.<p>export VISUAL=vim<p>Will make those program use com as the default editor. I believe for works that way for example.
评论 #35819803 未加载
fortunateregard大约 2 年前
Also see vim-like-pile[1]<p>[1] <a href="https:&#x2F;&#x2F;vim.reversed.top&#x2F;" rel="nofollow">https:&#x2F;&#x2F;vim.reversed.top&#x2F;</a>
eviks大约 2 年前
The browser implementations are unfortunately buggy, which is not reflected with a single +
deanstag大约 2 年前
Does anyone have a suggestion to have vim mode key bindings for chrome or firefox URL bar?
评论 #35821435 未加载
jononomo大约 2 年前
GPT-4 is useful for telling you how to do stuff in Vim, I&#x27;ve found.
thomastjeffery大约 2 年前
I wish we had modal editing that was <i>not</i> Vi bindings.
评论 #35823290 未加载
ggm大约 2 年前
No keyboard acceleration for HN however.
chrislan815大约 2 年前
wow just found `wasavi` in the list and it&#x27;s awesome.
评论 #35819369 未加载
0x445442大约 2 年前
No Gmail?
评论 #35817995 未加载
mkhnews大约 2 年前
htop-vim - cool