20 ms·
I have reached Vim nirvana
- deleted 4y ago[deleted]
- Lapsa 4y ago[vim-archery fzf.vim vim-gitgutter] is what I need
- Congeec 4y agoThis can be further extended to show plot images if the author decides to render repl outputs in a separate terminal (or a tmux pane) instead of a vim window.
- inductive_magic 4y agoI just use vim bindings as a jupyter extension. That way we can collaborate via `jupyter lab —collaborative` and have plots rendering directly under cells. You can hack plot visualization into terminals, but at that point something feels off to me.
- joshthecynic 4y ago[dead]
- maCDzP 4y agoBums me out that the title was isn’t “Vimvana”.
- wcrossbow 4y agoI'm sorry. Now that I know it bum's me too to not have reached for the pun :(
- eric-burel 4y agoAll apologies
- martinskou 4y agoYes, lost opportunity. Like COVID which should have been named KungFlu.
- deleted 4y ago[deleted]
- notpachet 4y agoNirvimna, surely...
- ISO-morphism 4y agoI use a similar setup in Emacs with code-cells.el [1]. VSCode had a tendency to choke rendering large interactive graphs in-line, so if I was needing to view in a separate process anyways a little elisp turns "write last IPython output to a tempfile, open, move to workspace N" into a keybind. Edit: browser-based Jupyter would also fall down here as the penalty for a graph being too big is at least a kernel restart. [1] https://github.com/astoff/code-cells.el https://github.com/astoff/code-cells.el
- LAC-Tech 4y agoGood for you - I always get stuck wish LSP. ALE almost works, except for the settings it ignores.
- xrayarx 4y agoBTW nirvana means ‚to blow out‘, like a candle.
- saberience 4y agoThe meaning of words changes and evolves over time. :)
- switch007 4y agoGoogle says: “ Figurative sense of "perfect bliss" is from 1895.” I think the ship has sailed
- illegalmemory 4y agoThat is correct, but general public understanding is a little different. Nirvana ( Sanskrit origin ) word to word means : to blow out / disappear / extinguish and so on. But to "achieve Nirvana" or "Nirvana prapti" generally means to reach a state when nothing else matters ( you have disappeared sort of , but very very loosely )
- yakattak 4y agoI always want to go this far with vim but I can’t break just using the vim bindings in IDEs like IntelliJ or WebStorm. Is there any big reason for me to forsake a full blown IDE for vim? I still use vim for small stuff but for navigating commercial codebases I can’t imagine not using a fully fledged IDE.
- eric-burel 4y agoNo I've tried a few times and it's not realistic especially since VS Code
- code-blooded 4y agoThe advantage of (Neo)vim is that it lets you create a PDE (personalized development environment) [1] where you can customize every little detail to your liking easily [2] and as a result program and navigate at the speed of thought. It takes some effort and likely 20-30 plugins, but you get to learn a lot and IMO become a better programmer as a (unintended?) side effect. For me it's part of the continuous improvement to understand your tools. Last but not least it's just so much joy when you can envision a certain feature (e.g. I wanted to have a function header visible in the first line of editor even when the top of the function has scrolled off the screen) and either find a plugin or program it yourself. This is exactly the kind of primal joy that initially made me pursue the career of software engineer. [1] The concept of PDE is explained in this video: https://youtu.be/QMVIJhC9Veg https://youtu.be/QMVIJhC9Veg [2] Easily is relative. IMO each little customization is quick, but you'll end up customizing hundreds of things over time.
- endorphine 4y ago> e.g. I wanted to have a function header visible in the first line of editor even when the top of the function has scrolled off the screen This sounds super-useful. Do you mind sharing how you achieved this?
- lancebeet 4y agoThere are a couple of plugins that do this. For vim: https://github.com/wellle/context.vim https://github.com/wellle/context.vim For neovim (much higher performance in my experience): https://github.com/nvim-treesitter/nvim-treesitter-context https://github.com/nvim-treesitter/nvim-treesitter-context I believe there's now also a VS code plugin for the same behavior, but I don't know what it's called.
- greyman 4y agoI don't know why, but vim never worked for me. I tried several times to learn it, but I always forgot the shortcuts... maybe the reason is that I used it only a few times per week, to change crontab or some config file on server.
- glotchimo 4y agoVim didn’t click for the longest time until I deleted VSCode and used it for everything. Much like with many other concepts/skills, throwing myself in the deep end worked best.
- flohofwoe 4y agoYou could just have installed one of the vim extensions for VSCode ;) (even though it's not 'real vim', it's good enough for using both cmdline vim and vscode without the brain having to switch in and out of 'vim mode')
- dpz 4y agowhy swap out of vim mode, add the key bindings to everything
- P5fRxh5kUvp2th 4y agoNo vim emulator is "good enough" if you actually know vim, although jetbrains is probably the closest due to the configurability of it's plugin. there are almost always quirks, but the biggest issue tends to be when bridging the gap between vim and the GUI itself, particularly around the modality of vim vs graphical autocomplete. If you're less experienced as a vim user these emulators are probably perfectly fine, but as someone who has been using vim for something like 20+ years, they _always_ feel just off enough that I either just go back to vim or edit the way the editor originally intended.
- doix 4y agoThe problem with every fake vim plugin is that the underlying editor does not implement tabs the way vim does. Combine that with the fact that all the UI elements are not vim-ified. In vim, since everything is a pane and a buffer, you just think "I want to select the panel to the left". Regardless of if it's a plugin view or a file or whatever. In vim emulator's, that's never the case. It's really not the same, but better than nothing. The vscode plugin and the IntelliJ one are both pretty good compared to previous ones that I tried. But the IDEs are just incompatible with the vim ideology, in my opinion.
- kimukasetsu 4y agoI have a similar setup with Emacs + Evil + Poly + Quarto Modes. Evil for vim keybindings, Poly to read cells as buffers and Quarto as a superior alternative to Jupytext [1]. [1] https://quarto.org/ https://quarto.org/
- omrjml 4y agoThis sounds interesting. Would you mind sharing how exactly you have this setup?
- joouha 4y agoIf people are looking for a more JupyterLab like environment for the terminal, you could try euporie [1] (I am the author). It supports vim and emacs style key-bindings, and can display rich cell output like images and widgets. [1] https://github.com/joouha/euporie https://github.com/joouha/euporie
- sva_ 4y agoIt sadly doesn't seem like this would support Jupyter Remote, which I've been heavily relying on (through vscode+vim) due to working on my laptop remotely with very limited hardware.
- kzrdude 4y agoIt's interesting to see this, I want to know about how others work. But I've found with jupyter that it's most productive for me to just use jupyterlab in the browser, it has lots of features and for the visualizations that I do I need a good viewer. So vim doesn't work, and executing in ipython is like the console, not the notebook interface anyway. I recommend using jupytext too, and then you can keep .py files as the canonical notebook files in your repo and code history.
- ryan-duve 4y agoI use IPython in a terminal and keep a Firefox tab open in a split screen to look at plots. When the IPython script is working, I write it out to a Python file. The only times I use Jupyter notebooks are: 1. If there's a really visually intensive workflow, like some sort of data exploration step where I need to be generating and inspecting multiple plots at the same time over and over. 2. If my goal is to make an instructional artifact and interleaving Python and explanatory HTML is helpful.
- perihelions 4y agoI use different tools, but what I do is insert image outputs inline with the calling code, in an Emacs text buffer. (emacs-gtk has native support for this). I don't have any explicit "notebook cell" logic. What I do is heuristically assume that an image object immediately following a code block is its corresponding output, and overwrite it on reevaluation. Very inexpensive hack that almost always does the right thing. (Also, the image-invoking functions are just native functions in the source language, so I get a lot of orthogonality for free. For example, all the eval- and send-expr- style keybindings work automagically -- no need to extend the elisp language mode to special-case images).
- rjzzleep 4y agoFrom my perspective when I had to turn ML models from a "real scientist" to something I could use in production, emacs-ipython-notebooks[1] was immensely helpful for me, since it allowed to connect to the jupyter server and edit and copy things from emacs to other code places as if I'm looking at an org mode file. I see the appeal of Jupyter notebooks for someone testing out things or experimenting, but it's a bit like a brain dump that isn't that trivial to navigate around when a second or third person is involved. [1] https://github.com/millejoh/emacs-ipython-notebook https://github.com/millejoh/emacs-ipython-notebook
- EdwardDiego 4y agoIt blows my mind that there's so much devotion to the tool first, problems second, which must be mashed into a shape that fits my tool. I don't think I'll ever describe myself reaching <X> nibbana, because, well, a hammer is a hammer, an IDE is an IDE, a tool is simply a tool, a means to an end.
- AstixAndBelix 4y agoI mean, in mathematics a lot of problems are solved by realizing they can be turned into another tupe of problem that we already know how to solve. If you know a text editor like the back of your hand, why would you learn another tool when you can take a different approach and be even more effective?
- EdwardDiego 4y agoHow many hours am I going to spend making my text editor work with this new problem? How long would it take to learn the new tool sufficiently to be reasonably effective? I always remember a coworker who was determined to use Emacs on our Java codebase. He spent three months trying to get functionality equivalent to 2010 Eclipse (I was one of the IDEA hipsters in the company back then), and failed. Hard. I always thought that in 3 months,n if he'd applied that effort to Eclipse, he'd probably be contributing patches to it.
- knewter 4y agoI have learned a multitude of tools. I have used vim/nvim since 2005. Prior to that, visual studio for a few years as a .net developer. I have sought to incorporate vim wherever I could because my muscle memory demands it for productivity. It's not from a lack of learning tools.
- f0e4c2f7 4y agoI find that some people really care about the work and that the tools are just a means to an end. Other people love certain tools so much that "the work" is actually just an excuse to use their favorite tool in more elaborate and challenging ways. Their attitude is something like "and now for my next trick..." The funny part, to me is that I've never been able to see one method as producing better results than another. I've seen work focused folks produce bad output and I've seen tool focused folks get caught up in their tools and never produce anything at all. But I've also seen both types produce masterpieces. Just different approaches and personalities I think.
- 127 4y agoI have learned Vim and tried it out. Still using Vscode. Don't understand the appeal. As long as you make some additional keyboard shortcuts for movement in Vscode, I really doubt you can go much faster with Vim. Plus I'm using about 100 plugins in Vscode and all the niche platforms don't have Vim addons for them. Domain specific plugins really make Vscode irreplaceable.
- jerpint 4y agoVScode vim emulation is great! But when you just want to fire an editor to do a quick change, vim is your friend. It’s also reliably present on almost any server you’ll ssh into
- shriek 4y agoThe appeal is it's hackable. Top to bottom. Pretty sure VScode is too but you can literally just write functions and get vim to do the things you want it to.
- GaryPalmer 4y agoIt's great for a command line editor. I don't know why anyone would use it in a desktop environment though.
- inDigiNeous 4y agoBig part of the appeal is keeping your hands on the home row all the time, without having to reach for the arrow keys. HJKL for movement makes all the difference for keeping focus on the writing, not having to reach out to the arrow keys when wanting to move or communicate motion. This combined with the excellent text manipulation features right there from the keyboard, without leaving to menus, being able to just flow with the Vim -keybindings, and in all different IDEs and editors that support Vim -support, it's just great.
- linsomniac 4y agoSounds like VSCode is working great for you, no reason to change. Especially as, if you ever decide you want to use modal editing, there's a VSCode plugin for that. But, since you mention it, there are a few things that appeal about vim. For me, personally, I am quite often working on remote systems from the command line. Being able to "vi filename" and make some changes and get back to the command line is important and VSCode doesn't seem to work for that. I know it has remote editing, but navigating over there from Code isn't worth it when I can just "vi filename". A significant part of the appeal is the modal editing, which as I mention above is available in Code.
- jerpint 4y agoI’ve tried the jupytext approach and had problems when files get out of sync (which inevitably happens). So far, my best Jupyter/vim solutions are either to use a jupyter extension that enables vim bindings or use jupyter in vscode with vim emulation
- DecemberSnow 4y agoFor PyCharm users, FYI using notebooks within the IDE with Intellisense and jupyter server management is available out of the box [0]. [0] https://www.jetbrains.com/help/pycharm/jupyter-notebook-support.html https://www.jetbrains.com/help/pycharm/jupyter-notebook-supp...
- synu 4y agoVim enlightenment for me was learning to use it with all the default settings. Everywhere I go, it’s already set up just the way I like it.
- adlpz 4y agoThis also makes it easier to use the vim keybinding you find in many IDEs, as you are not relying on more arcane or customized bits of vim itself, but the general concept and common idioms.
- roland35 4y agoTotally agree. Although wherever I go, I map "jk" to <ESC> since I find that so much easier to enter Normal Mode.
- synergy20 4y agokj for me,thats all i need on servers
- vaylian 4y agoLet me introduce you to ctrl+c which is the same as <ESC> in most cases (notable exception: visual selection mode)
- czx4f4bd 4y agoCtrl+C requires taking your fingers off homerow and pressing two keys at once, though. Granted, escape also meets those criteria if you map it to the caps lock key, which I do. The jk mapping is still useful in the rare occasions I use vim on my phone, though.
- robervin 4y agoI remap caps lock to ctrl on my OS which does make it a little more ergonomic, but I still prefer your method. Although, whatever wizard taught me vim and gave me their beginner cheat sheet had jj instead of jk.
- eric4smith 4y agoDefault Vim is best. Actually just editing/copy/paste/delete is more than enough for 99% of uses cases. I been using vi since 1982 and vim now. No need for anything else. No plugins. Nothing. Just vim.
- gsinclair 4y agoCrazy. At the very least, a plug-in à la vim-surround is a clear improvement.
- inDigiNeous 4y agoThe Vim enlightenment for me, was to let go of Vim. Modern IDEs with Vim support: bless you. XCode got finally Vim -keybindings also. CLion and other IntelliJ -ides have great Vim support, VSCode also. Sometimes I still use Vim only when editing some old school stuff or just simple files though, for my development journals I still always use Vim.
- mlboss 4y agoI take the different approach. I use vim binding in all my editors and IDEs. Most of them have vim plugins. Jupyter also has a vim mode.
- animal_spirits 4y agoThe VSCode Neovim plugin works with the Jupyter plugin for VS Code. So you can use your favorite editor inside Jupyter inside VSCode without having to change windows at all. It's a breeze
- et1337 4y agoIn my book, it’s way better to install one Vim extension in whatever your favorite IDE is, than to install Vim with a hodge podge of 5 extensions and 300 lines of Vimscript. The keybindings are really the unique selling point of Vim, and you can get them anywhere. I actually view this as another advantage of Vim; you don’t have to learn new keybindings every time you switch editors.
- bobbylarrybobby 4y agoEven better, use Neovim’s server mode in your IDE, since then you're getting “real ” vim, not just a plugin that attempts to copy it.
- anonporridge 4y agoDon't forget the browser. Vimium radically improved my entire web browsing experience. I can't live without it anymore. https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/ https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/ https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en https://chrome.google.com/webstore/detail/vimium/dbepggeogba...
- hansvm 4y agoQutebrowser is worth a mention too. Google has sufficiently neutered extensions that I fell out of the flow pretty often with Vimium (e.g., can't work on any of the built-in pages or some other Google properties), but having chrome exist at a much lower level and building the UI around vim bindings has made it a 10x better experience for me in Qutebrowser.
- d0mine 4y agoThere is `--extensions-chrome-urls` command-line flag (Chrome shows a scary warning, it works otherwise).
- behnamoh 4y agoI used Vimium for years until I discovered SurfingKey, which offers way more features.
- synergy20 4y agoI'm a vim user and wondering if neovim worth a try these days, so far vim does everything I needed. for jupyter in vim I do think vscode has some edge, it can show the output(i.e. graphs) right inside without a browser. plus jupyterlab has vim mode to get by. will find sometime to see if these steps can be converted to vim.
- Tmpod 4y agoIf vim is working well for you, I'd say not to chase neovim, unless you feel like trying something new. Moving to nvim is pretty straightforward, but more and more stuff is expected, in a way, to be configured through Lua. That's nice, but it is a change from vimscript which you may not want to make. Neovim has a lot of momentum going and high quality (and fast/light) plugins, in part due to Lua, but also due to the ever growing integration with modern editing and software development tools like TreeSitter and LSPs. It's a really nice ecosystem, where you can find pleasant plugin surprises almost every week. I really like it, but if you fancy a more stable and battle-tested system, vim may still be more appealing. Or neovim with just classic vim plugins.
- bastardoperator 4y agoI bounce between vscode and neovim, I use the https://github.com/AstroNvim/AstroNvim https://github.com/AstroNvim/AstroNvim config. I prefer nvim now.
- ludicast 4y ago100%. Astronvim gives me everything I'd ever want from an IDE, plus with another dozen or so lines of config I make it my own.
- gsinclair 4y agoI’m a very long time vim user and neovim has really reinvigorated my interest. The high quality core and high quality plugins are frankly inspiring. That said, I’ve probably lost an unreasonable amount of time tinkering these last several weeks, but it’s time I find interesting, so…
- deliriumchn 4y agoI tried to get into vim countless times but every single time I fail because I already remember intellij keybinds and feel myself helpless without webstorm interface/ide functionality (where everything is included by default and works great with ts/react/solid). I respect people who can and love to use it, but its simply not for me
- zamalek 4y agoThe biggest advantage of vim is the movements (key bindings), and there are plugins for many editors for that, e.g. https://github.com/JetBrains/ideavim https://github.com/JetBrains/ideavim
- wyclif 4y agoThe one thing I miss in Brave is some kind of Vim mode.
- bluenomatterwho 4y ago"Just use vim bindings in Atom. Atom is extensible. Vim is dead." RIP Atom editor 2022-12-15.