![]() I might eventually move this into Denite menus à la SpaceVim, but for now I’m digging the simplicity of using :ex commands. This allows :tt for Toggle Tagbar and so on – a nice memorable taxonomy rather than a flat multitude of somewhat arbitrary leader combos. For example, instead of binding Leader+ T to open NerdTree, :tn is used ( Toggle NerdTree). I’m experimenting with Spacemacs-style command mnemonics in my Aetherwolf Vim config. it opens a lot of easy to remember possibilitiesĪdding gobs of plugins instead of learning Vim’s native functionality is another common trap, so I maintain a secondary lightweight Vim config called Ninjarc with minimal plugins to keep me sharp.įinally, Tim Pope’s philosophy of favouring commands over leader key combos yields a more cohesive configuration.it’s less prone to conflicts with your OS or terminal emulator.Especially in a terminal where Alt is often problematic and Cmd unusable. All your Cmd+ Shift+ Ctrl+ Alt combos won’t lead you anywhere. Instead of wasting your time trying to make Vim and your terminal into something that it’s not and can’t be you should learn how to use and customize Vim wisely. There is no way to transfer all your old habits seamlessly, point blank. Vim is not TextMate or whatever other editor you have used before. When I first discovered Vim I wasted a lot of time trying to bend it backwards into a traditional editor. If you use multiple keyboards with your mac, for example an Apple Magic bluetooth keyboard, the modifier keys are configured individually for each one – so make sure the correct keyboard is chosen in the “Select keyboard” dropdown: Below are the System Preference settings required to make this setup work. This was a serious annoyance, since the VIM shortcuts are burned into my fingertips.Įnter HammerSpoon! Using the ControlEscape plugin, I am now back in remapping bliss. Get the bundle ID of the app, and only if its Google Chrome block CMD+F and remap CMD+N. The trick is to check which is the frontmost (active) application while doing so. Detect when CMD+N is pressed and create key events to simulate CMD+F. Detect when CMD+F is pressed and return true to block it. In macOS, I’d been using Karabiner Elements to enable this remapping, however with macOS Big Sur I could no longer get the configuration to work. Setup an event tap for the key down event. ![]() Pressing and releasing sends the Escape key, while pressing and holding emulates the Control Key. Remapping the Caps Lock key to Control and Escape is a big part of this workflow. This philosophy allows fluid text editing and staying in the “programming flow state”. You can do so in System Preferences -> Keyboard -> Modifier Keys. I recommend remapping your Caps Lock key to Control. Below, I show the Lua script that I use to make Hammerspoon my basic OSX keyboard controlled window manager to move and resize windows easily. I’m a big fan of VIM modal editing and keeping keyboard shortcuts as close to the home row as possible. Hammerspoon is a really powerful but simple automation tool for OSX. For more better text editing and great success.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |