8 ms·
Editors (Vim)
- jedwards1211 6y agoVim emulation in VSCode worse than any other IDE I've used. All extensions have to run on the same thread in a background process and intercepted keystrokes are passed to that process over IPC. So if other extensions (like the TS language tools) are tying up the extension host process, the Vim extension can't respond to your keyboard input until other extensions yield. Performance issues come and go but for awhile I was stuck waiting for several seconds any time I typed a < after an identifier. A lot of us have tried to demand a separate process for extensions that intercept keystrokes to solve this issue permanently. But the maintainers don't really care.
- tazard 6y agoThis makes so much sense. Thanks for explaining that.
- lawn 6y agoI don't use it myself but it's possible to embed Neo Vim in VSCode. So you're able to use edit text using a real instance instead of relying on a crappy emulation.
- fstarship 6y agoI am not entirely sure if you are referring to https://marketplace.visualstudio.com/items?itemName=asvetliakov.vscode-neovim https://marketplace.visualstudio.com/items?itemName=asvetlia... I just switched after using vs vim and got much better performance. I had neovim installed anyway for the EX commands
- lawn 6y agoYes, that's it.
- wildrhythms 6y agoI use VS Code w/ vim mode for NodeJS/Angular/React development and haven't noticed performance issues; granted, I'm running on a beefy Windows PC since it's the only good option I've found for vim on Windows. On Mac/Linux I just use neovim with coc[1], which works beautifully. [1] https://github.com/neoclide/coc.nvim https://github.com/neoclide/coc.nvim
- chongli 6y agoAs a long time vim user, I’ve tried VSCode a few times and I cannot for the life of me figure out what all the hype is about. Can anyone who is proficient with it explain the philosophy behind it and what makes it so great? This is a sincere question, not a rhetorical one.
- oehtXRwMkIs 6y agoIt's very featureful and very easy to pick up. So I speculate that most of its popularity is with people that unfortunately have not yet been enlightened by vim/emacs.
- chongli 6y agoThe article said 1.4 million people have installed the Vim plugin for VSCode. That's a sizeable chunk. Presumably a bunch of those people really like the editor.
- EduardoBautista 6y agoI used Vim for several years before switching to Sublime Text 3.0 and now VS Code. VS Code support for TypeScript is just unmatched on any other editor.
- EQuimper 6y agoWebstorm typescript feel better for me
- pokernaming 6y agoI use vscode daily for everything, from note taking to programming. Here are my pros and cons. Pros: - Has plugins for anything.You're doing C++, just install C++ plugin and you're good to go. Want vim key bindings there's a plugin for that as well. I use a plugin that can scrape competitive coding websites and automatically create tests for a problem. - Git, snippets, etc all modern IDE features built-in. - It is also found on many websites as an editor. Cons: - Since it's electron. System requirements are on the higher end.
- satvikpendem 6y agohttps://marketplace.visualstudio.com/items?itemName=asvetliakov.vscode-neovim https://marketplace.visualstudio.com/items?itemName=asvetlia... This is using a real neovim instance rather than emulation, and performance is excellent for me.
- fstarship 6y agoI second that and would like to point out that apt-get only saves an old copy of neovim. I had to install the latest version using snap. This issue is described in the link but I thought it deserves highlighting
- jussij 6y ago> I was stuck waiting for several seconds any time I typed The worst behaviour of any editing environment is a lagging keyboard response. In this COVID-19 era I've found myself working remotely over VPN and on some occasions the response times become very slow. The most noticeable observation for me is how frustration writing code becomes whenever my editing environment slows over that lagging VPN. Tasks that are normally subconscious suddenly turn into mental challenges as you find yourself constantly checking if these subconscious actions actually complete.
- jrockway 6y agoI don't think there is any need to suffer just because you have a slow connection. You can use mosh if you're editing on a remote machine, or sshfs if your editor is on your workstation. I have heard that you can run the Language Server on the remote machine as well, for things like completion/indexing/etc. (I personally always just ssh to the remote machine and use Emacs though. Then I have the same environment at home and work and don't have to sync anything.)
- vulcan01 6y agoI feel like it would be far more useful to just talk about vimtutor. At least for me, it was the only way I was able to grok vim.
- ryannevius 6y agoThis. And if you get to the end of vimtutor, you'll see a recommendation to continue learning via `:help user-manual`. I would have saved myself months of effort trying to learn Vim if I would have just RTFM.
- sage3 6y agoFrom the link posted by the OP: Exercises 1. Complete vimtutor
- moonchild 6y ago> no matter what shell you use, you can export EDITOR=vim Nit: in csh, it's 'setenv EDITOR vim'
- ima_banana 6y agoHas eye-tracking been explored for improved code editing beyond Vim? Vim does away with the hand-travel delays, but many of these ninja keystroke moves to navigate code are just what your eyes do already (but not all, such as the search function).
- jamesrcole 6y agoLooks like it has. E.g. - https://medium.com/fast-company/the-mouse-of-the-future-your-eyeballs-dd728cc7e111 https://medium.com/fast-company/the-mouse-of-the-future-your... - https://purehost.bath.ac.uk/ws/portalfiles/portal/190368020/ReType_CHI2019.pdf https://purehost.bath.ac.uk/ws/portalfiles/portal/190368020/... more https://www.google.com/search?q=eye+tracking+text+editing&oq=eye+tracking https://www.google.com/search?q=eye+tracking+text+editing&oq...
- airstrike 6y agoWas going to read the first link, but can't be bothered to sign up / sign in to medium.com. Screw that platform.
- deleted 6y ago[deleted]
- erklik 6y agoRecently, I had an idea (which is somewhat stupid and makes me think I am rather lazy) to switch window context between two monitors using my eyes. Mainly because, right now, most of my workflow is from my keyboard, but to switch windows, I have to make either a weird hand twisting shortcut or use the mouse. I haven't yet found such a solution but I do wonder how hard it would be build such a thing.
- lixtra 6y agoPossibly cheaper and more reliable you could attach a pedal to your usb port. As a next step you can start training an ai connected to your cam. Could be a nice project.
- michaericalribo 6y agoVim is a well-sharpened pocket knife, a precision tool that excels at editing text interactively. It’s interesting to me the different models for tools that address similar problems. I used to use vim, and the chords of keystrokes are still fresh in my mind, even though I switched to emacs years ago. And now I use vanilla emacs —but that model is totally different, it’s an okay text editor but an excellent customizable user shell. It’s not a matter of better//worse, but of different philosophical approaches
- Cyph0n 6y agoWhen deciding between whether to learn Vim or Emacs, Vim won me over with three things: 1) Learning Vim increased my efficiency across multiple machines, and not just my dev machine. 2) It's extremely lightweight. Note: you still need to be careful with plugins! 3) Modal editing is easier on the wrists. Most of my time as a developer is spent navigating through code (whether editing or browsing), and Vim's normal mode keybindings are much less modifier-based.
- adamredwoods 6y agoI respect Vim, I've seen it used with impressive speed, BUT I am so used to command-s to save, that I don't feel ready to :w enter all the time. VS Code is powerful, and learning the keyboard shortcuts for that are getting better every day (command-shift-p format-selection enter).
- pokernaming 6y agoVScode has a vim plugin. You can easily customise your key bindings as well.
- Exuma 6y agomacvim still supports command+S
- Ingon 6y agoYou can put something like this in your .vimrc: " save with ctrl+s nmap <c-s> :w<CR> imap <c-s> <Esc>:w<CR>a Edit: I guess it should be: nmap <D-s> :w<CR> imap <D-s> <Esc>:w<CR>a
- kdheepak 6y agoYou can also use imap <C-s> <C-o>:w<CR> <C-o> in insert mode can be used to execute normal mode commands.
- jchook 6y agoYou get over it fast. 1. You can bind save to any key combo you want. I personally use <leader>w. I find it more ergonomic, fast, and portable than command-s. 2. Every action in vim reads like a little story. You start to speak the stories to yourself. For example: Select the entire line (V), move to the end of the line ($), move to the matching end brace (%), delete (d) 3. Then you realize you can store those stories into a macro and execute them ad hoc, and the world becomes amazing. The things you learn are cumulative. You begin to expect the pattern to continue and more often than not it does.
- feute 6y agoI used to have something like nmap ,w :w<cr> in my vimrc so I can only press two keys to save the file. I think the colon character (:) adds a little overhead to such a common command because one has to press shift with the colon/semicolon key (depending on the keyboard layout), and then release them to continue pressing the remaining keys. And this is if you're already in normal mode; if you're in visual/insert mode you'd have to press Esc or Ctrl+[ first. Of course, these are small details that you don't normally think about, but it does feel a little cumbersome when coming from an editor where you can just press Ctrl+s or C-x C-s (in the case of Emacs) and continue working. In the end, vim doesn't stop you from defining key bindings to improve your workflow.
- gorgoiler 6y agoI’m so used to vim as a code editor that I assumed, after the introduction, this article was going to be castigating me for trying to write prose in vim (which I indeed try to do on a regular basis, with what feels like a lot of friction.) Perhaps, as they imply, I should dust off a copy of Microsoft Word and switch back to that!
- blt 6y agoThere is no conflict if you use LaTeX :)
- gorgoiler 6y agoGoyo.vim was pretty helpful. So was formatoptions +a. (The typesetting part isn’t the issue. Concentration and ease of flow in the editor feel hard in vim, and LaTeX wouldn’t fix that.)
- muststopmyths 6y agocomplete the circle and use a vi plugin for Word http://www.viemu.com/ http://www.viemu.com/
- hwestiii 6y agoI feel about Vim the way RMS seems to feel about Linux. Even though, (presumably) everyone knows the relationship of vim to vi, I don’t feel there is enough explicit acknowledgement of that fact. Vim is evidently a wonderful tool, (I say this as a confirmed 20 year emacs user for whom emacs is only usable due to excellent vi emulation possibilities) but it clearly wouldn’t exist without the basic foundation provided by canonical vi which is in my estimation a work of genius.
- jdnier 6y agoIt's hard to sense how much of vi is in vim, having only ever used vim. But I've never been very happy with vim, even though I've used it for 15 years. Maybe I need to find a "vim, the good parts (aka vi)" book.
- cheez 6y agouse spacemacs with vim emulation :-)
- jamesrcole 6y agoI used Vim for a number of years (I'd guess around 10), and for the last year or so I've been using Spacemacs. I think there's so much that's great about both of them, and I'll continue to use one or the other, but geez, there's so many niggling issues with both that can be offputting. A couple of examples. In Spacemacs, the screen regularly goes blank for a while. Or if I have a file open in Spacemacs, close its window, then rename it in the OS, then reopen it in Spacemacs (by double-clicking it in Finder) it reopens it with it's old name. I'm sure there's a way to avoid this, but the fact that it happens in the first place is the issue.
- cheez 6y agoNever had the screen issue, gotta imagine that's the os and emacs. As for the file rename issue, certainly if that's part of your workflow, it's helpful to figure out why it happens. I suspect it's due to the way filesystems work on Linux /Unix.
- smabie 6y agoI would have expected MIT to rep Emacs, not vim...
- SllX 6y agoIntellectual diversity lends itself to a diversity of editors as well.
- apotatopot 6y agodo set -o vi in bash and watch all your dreams come true.
- iso-8859-1 6y agoeven though I have always used ViM, I can't do this, I am too used to using control-a and control-e
- archarios 6y agoI discovered this last year and it has made me so happy
- smitty1e 6y agoIf you like modal editing, consider https://www.spacemacs.org/ https://www.spacemacs.org/ The org-mode[1] outlining and magit[2] wrapper for git are most worthy. [1] https://orgmode.org/ https://orgmode.org/ [2] https://magit.vc/ https://magit.vc/
- cycomanic 6y agoI used spacemacs for a while, but once you use several layers it becomes so slow that it makes VSCode feel snappy. I also find that because it has such a customized way of doing things it often becomes quite difficult to make your own customizations, especially if you try to follow guides written for pure emacs. I've just started using doom emacs, another "distribution" around evil-mode. So far I really like it, it is much snappier than spacemacs and the layering and customization system is much closer to traditional emacs.
- partiallypro 6y agoI'm by no means a high level expert of command line, but if I need to do a quick edit I just use nano, and if I need to get down and dirty I use VS Code. Is this abnormal? I know a lot of power users use Vim, but I've just never fallen in love with it.
- mongol 6y agoIt is not abnormal. I used to use pico as my terminal editor and nedit as X editor the first five years or so I used Linux / Unix. Today I use VSCode as well, but vi rather than pico (nano). Over the course of many years I got more and more comfortable with it. It was never really a conscious choice. But it is always there. Perhaps it was the times I needed to fix things when booting in emergency mode that forced me to learn vim enough to get by, and eventually proficient.
- archarios 6y agoThis is unfortunately not uncommon. I feel like most of my coworkers at most companies Ive worked for don't use vim. One killer app of vim for me is macros. You can record a string of commands and map doing that to a letter. This makes certain mundane changes you have to do sometimes in software a breeze. For example, I had some code where someone was using string literals everywhere when they should have defined an enum. The convention we use for this kind of thing is to use UPPER_SNAKE_CASE and the strings were in camelCase. I was able to define two macros that let me improve this code in a few seconds. If I wasn't using vim I'd probably just leave that code as it was because it would have been so much effort.
- j-james 6y ago> If I wasn't using vim I'd probably just leave that code as it was because it would have been so much effort. Most modern editors, Visual Studio Code included, have powerful refactoring abilities. Not only that, but they're usable without needing to be an editor expert - just right-clicking and selecting "Change all occurrences" (or pressing F2) does the trick.
- 6y ago
- pixelmonkey 6y agoI've been a happy vim user for many years, over a decade. But I was shocked at how this talk, published on YouTube in 2018 from a recorded lecture by an engineer at Yelp named Leeren Chang, basically made vim’s internal model “click” for me and made vim even more fun to use. I really feel the presenter did such a great job showcasing vim ideas — conceptually, visually, and by direct example — that, by the end, I downloaded the talk into my “great tech talks” stash and labeled it, “vim’s missing manual.” Here it is: https://youtu.be/E-ZbrtoSuzw https://youtu.be/E-ZbrtoSuzw
- s3graham 6y agoHeh, "how you access ex commands shipped with Unix since like the 90s"
- ulisesrmzroche 6y agoThe best part about vim is modal editing and the key-command interface. Other than that, it’s pretty much the same as everything else, worse, cus vimscript is an abomination. Best setup is vscode with vim emulation and I’ve been using vim profesionally almost 15 years now. Funny enough, I actually liked writing prose with Vim but I’m using Ulysses as an editor for writing prose now
- ufo 6y agoI love vim but I always get a feeling that I'm only using 1% of its features. It is hard to memorize all the availanle keybindings, specially if it is something that you don't use often. Does anyone have suggestions of what worked to help learn mor Vim commands?
- alwillis 6y agoOnce you understand the verbs and nouns of Vim, you don't need to memorize nearly as much. [1] Learn vim For the Last Time: A Tutorial and Primer— https://danielmiessler.com/study/vim/ https://danielmiessler.com/study/vim/ [2] The Vim Learning Curve is a Myth—https://thoughtbot.com/blog/the-vim-learning-curve-is-a-myth https://thoughtbot.com/blog/the-vim-learning-curve-is-a-myth [3] Vimcasts—http://vimcasts.org http://vimcasts.org
- codyb 6y agoI spend a lot of time in tmux and I frequently open and close terminal sessions so I made this https://github.com/cboppert/motd https://github.com/cboppert/motd It’s message of the day but with ViM tips. It worked fantastically for getting small tips throughout my day that allowed me to consume and learn without necessarily dedicating any tangible amount of time to it.
- read_if_gay_ 6y agoI suspect it’ll take a long time for that feeling to go away, but what helped me for learning is just using Vim everywhere and sometimes when you run into a particular problem where you think there might be efficient ways to solve it, look it up. Give yourself some time to get used to the new commands and really add them to your repertoire before you look up something new.
- srameshc 6y agoResearched a bit for last few days about IDE and Vim seems to be the only viable long term option. I like Atom but it crashes all the time, VSCode doesn't feel clean to me. IntelliJ is the best but expensive. Only option I think is vim or Emacs. I loved the time I spent with Emacs last time, but gave up quick. I will learn to use Vim this time.
- bcrosby95 6y agoOr both! I was a long time Vim user that switched to Emacs with evil mode. Using spacemacs. I have a couple friends that swear by Sublime Text. It costs money but its not terribly expensive, and super fast. Its vim plugin is a bit lacking though so it wasn't that usable for me.
- BooneJS 6y ago20 years ago I got a job and went from Windows to Unix. Tinkered with both emacs and vim, and for some reason had this craziness where I'd start new files in emacs and make small edits in vi/vim. I have dabbled with neovim and vim-modes in other editors, but I keep going back to a somewhat-customized vim with ~8 packages. I'm not really an advanced vim user. I have to think and remember how to do column edits, and I never yank to registers. For some reason I want to make a concerted effort to learn emacs again but the idea of not having edit modes concerns me.
- mikekchar 6y agoEvil mode in Emacs is almost perfect. My biggest complaint is that undo works differently than vim (if anyone knows how to fix that, I would be forever grateful!) I originally used Emacs for about 20 years and then switched to Vim for a variety of reasons. I love the editing model in Vim. But for the last few years I've been using Emacs with Evil and it's been the best of both worlds.
- glenf45489 6y agoDear Friend, Learn mask is urgent needed there with sanitizers, we have N95 KN95 and disposable face masks to offer with sanitizers,CE and FDA certified. Competitive prices and quality. Mask and sanitizers are shipped by air. Safe and Quick Any needs please email me for quotation. name philip Gonzalez Whatsapp :+1-740-966-1107 Email:masfinancialservices1@cash4u.com
- glenf45489 6y agoCONTACT US FOR ALL KINDS OF HACKING JOB We offer professional hacking services,we offer the following services. -University grades changing -Bank accounts hack -Erase criminal records hack -Facebook hack -Twitters hack -email accounts hack -Grade Changes hack -Website crashed hack -server crashed hack -Skype hack -Databases hack -Word Press Blogs hack -Individual computers hack -Control devices remotely hack -Burner Number -Verified Paypal Accounts hack -Any social media account hack -Android & iPhone Hack -Text message interception hack -email interception hack -Bitcoin recovery -binary multiplication -credit score upgrade -Track Calls log and Spy Call Recording. Monitoring SMS text messages remotely. Cell phone GPS location racking. Spy on Whatsapp Messages. -Untraceable Ip etc. Contact us at glenfthomas@gmail.com or text or call ((770) 824-6784 WHATSAPP NUMBER:+1-917-809-8609 for more inquiry..
- caymanjim 6y agoIf you think Vim emulation is a replacement for Vim, either you don't know Vim or you don't like Vim. VSCode Vim emulation? Spacemacs? They are miniscule, pale comparisons. VSCode is a fine editor. Emacs is a fine editor. Spacemacs is pretty fantastic. But if you you think that's Vim, you simply don't know and appreciate Vim. That's ok, but it's not even in the same universe as the real thing. By all means use what you want, but don't try to sell it as close enough.
- bokwoon 6y agoI agree, but also understand that many people use only a subset of vim and think of that as the full package. And that's fine for them.
- gnl 6y agoWould you care to elaborate and point to some specific features and workflows that you consider to be unique to the real Vim?
- celeritascelery 6y agoI honestly can't think of anything that the vim adds the you can't get from vim emulation. Especially a top notch one like Emacs Evil. Please use vim for the keybindings, not the software.
- ilaksh 6y agoI have been using vim as an advanced beginner off and on for more than 15 years I think. I use it lots of times (not for everything, I also use Visual Studio Code), mainly because it means that I can just ssh over to a VPS and edit a file in there, without having to set up fuse or some other way to edit locally. It seems like less work to just get into files and set up a new VPS. And I know there will be syntax highlighting for everything. And also I have kind of a sunk cost of finally learning how to do basic things over the course of many years. But personally, I think that it is embarrassing for people who seriously espouse that modal editing is better than more modern concepts. The reason we have hjkl for movement is because that is what the terminal was like when vi was invented. And the reason its Escape which is a little inconvenient on modern keyboards is because the Escape key on that terminal was more like where Tab is. And the reason its modal editing is because "real time editing" didn't even generally exist when vi was invented: "Back in 1970s, terminal screen are 80 columns by 24 lines. There's no real-time editing. You edit by typing a command, then call another command to have the screen update to show the result of your command. Vi's “modal editing” is evolved from this." http://xahlee.info/kbd/keyboard_hardware_and_key_choices.html http://xahlee.info/kbd/keyboard_hardware_and_key_choices.htm...
- semicolonandson 6y agoIf anyone is looking for some vim-porn (in the form of screencasts of a decade-long user going through various workflows), I'd like to use this opportunity to share some screencasts I recorded that I think will resonate with fellow HN readers: https://www.youtube.com/watch?v=futay9NjOac https://www.youtube.com/watch?v=futay9NjOac
- ljosifov 6y agoThis (advanced?) vi/m tutorial I really liked and found it useful over the years https://www.ele.uri.edu/faculty/vetter/Other-stuff/vi/009-index.html https://www.ele.uri.edu/faculty/vetter/Other-stuff/vi/009-in.... It is by Walter Alan Zintz, originally published in UnixWorld Online, dvelves into more advanced vi/m use. From https://sanctum.geek.nz/arabesque/unidex/ https://sanctum.geek.nz/arabesque/unidex/, that itself I find a gem (e.g https://sanctum.geek.nz/arabesque/series/unix-as-ide/ https://sanctum.geek.nz/arabesque/series/unix-as-ide/). Long time lurker first time poster, registered for this :-O