I’ve learned some vi, and emacs, Visual Studio, VS Code, XCode, IntelliJ, and Android Studio.
All the examples listed are pretty uncommon or trivial in any of the other IDEs (aside from the regex part, which is cool, but I never want to be in a place where I have to regex my code...ever). 90% of the time I’m doing simple code maintenance, with an occasional refactoring. And I know devs that swear by vi...they are developing any faster than I am, and I touch my mouse about as much as they do (hardly ever).
My favorite is still Visual Studio with Resharper, worst is XCode.
I am writing this from emacs experience (some if not all these features are in vi as well), there are features from emacs that make a real difference in writing programs especially:
* Unlimited yanking from kill rings: ie pasting text from history of the clipboard.(This is one thing I have most difficulty with when switching from emacs to modern editors)
* Macro recording and playback : recording an arbitrary set of edit operations and then replaying them any number of times.
* two or more code frames/windows side by side, even displaying the same file Surprisingly modern IDE guis seems not designed for it, eclipse can do it but clumsily.
* Remote file editing: use the IDE tools to edit file residing on another computer.
* Column edits or rectangle edits. Selecting a vertical column or rectangle of text and copying, moving it to another place.
> And I know devs that swear by vi...they are developing any faster than I am
I hear about this from time to time, but have never seen it people do it successfully first hand, what I do see is silly mistakes in their checkins; incomplete variable renames, formatting is off, syntax errors, switching between browsers and their code while looking at manuals, or other obvious mistakes that can be caught inline by IDEs while you type.
> but I never want to be in a place where I have to regex my code...ever).
I use regex search and replace fairly often; why are you so opposed to it?
If I need to change $t1 into t1 in a group of 6 lines (something I did today), its pretty easy to just make that replacement automatically. Doing it by hand would just take longer.
If you're still working with VS & Resharper and your projects allow you to, have a look at Rider from JetBrains. It supports the same color scheme & hotkeys as VS + Resharper out of the box so the transition is very smooth, you'll be productive in minutes after installing it. Also, if you were using VsVim, you can use IdeaVim for Rider and in addition you can install KJump plugin (it's what easy-motion is for vim). Since setting this up, rider & webstorm have become my favorite developer tools I have ever worked with and I feel they are superior to VS & VSCode (the things I was using before).
First, I also had trouble with XCode.
About the regex in vi: there is a technique of writing/maintaining code based on substitutions instead of inserting/deleting. It can be very powerful but you have to "write" your code thinking about the patterns and maintaining some kind of structure. I am not saying that it is good or recommended. It's interesting. I coded for like 5 years like that. I was maintaining a codebase completely solo. When working with a not very synchronized team or having tools like resharp or omnisharp etc avaliable, I don't think it would pay off.
Searching with regexes is more likely to be useful when trolling through log or data files than code.
Even then, the most common cases for me are searching for a string only at the beginning or ending of a line, or only searching for instances that are not part of a larger word.
I've been using Neovim consistently for the last few months and it's a game-changer. Terminals within Neovim that I can paste into/from my Vimwiki files or source files is amazing. It's not very different from a Vim setup and using it with the Qt GUI on Windows gets rid if the issue of having everything close when eventually having to call <C-w>. Meanwhile, in my linux environment it runs like a charm on a terminal.
Same here neovim with session management and tmux with session management, with tmux russerect and tmux continuum. And with the language server integration in neovim, its a swiss army knife that works well with most modern languages and devops.
IntelliJ with the IdeaVim plugin is my goto editor nowadays. As others have said, I honestly don't find myself using the really fancy features of vim that often. What I do use frequently are basic motions together with yanking, deletions, word movement (w/e/b), marks, indents, centering (zz), page scrolls (ctrl+u/d), and using searches (f and /) to jump around in code quickly.
For those purposes, IdeaVim works just fine, and gives me all the little speed boosts of vim with the added bonus of (in my opinion) a much more robust coding environment. It even makes some functions better; for example, `gd` works super well and nearly instantly in IntelliJ since the definitions are supplied by the IDE's 'Go To Declaration' rather than some hacky vim plugin. Other editors have similarly sufficient vim plugins, e.g. VSCodeVim.
Have they fixed the issues with where the cursor ends up after certain operations? It's been a couple of years since I've used it, so I can't give an explicit example, but there were multiple common operations where the cursor would end up in a different location afterwards than it does in vim. This was really difficult for me because I still used vim a lot for other things, and it felt like it was actively eroding my muscle memory to use two conflicting implementations.
Your problem with Vim is that you don't grok vi. [0]
I agree with you that if you don't use a specialist tool 24/7 you'll be slow, but that is expected vi optimizes for expert users not for novice users.
In the same way that if I don't use Photoshop and then just want to do something simple in it, it's going to take me a lot of time and am probably going to forget how to do it because I don't use it enough.
I have a friend who used to use Vi(m) with his Dvorak keyboard at home, and Emacs with his qwerty keyboard at work. He considered it an exercise for keeping his brain sharp. I don't think he still does it, but maybe.
* Eclipse - Forced to use this in University in the early aughts. I would say that crashing and clobbering systems was its best feature. You moved your mouse it crashed; thought about saving crash; need an update, now you need to format and clean install windows; want to print, printing works! want to compile, your gonna need to try again after restarting windows...
* SSH - In University we had some awesome terminal servers that were a joy to work with. I could access all my work from anywhere, regardless of how limited my local machine was. Vim was always there, chugging right along.
"vi is the de facto standard Unix editor, you find it in every *NIX derived OS"
I was going mention a recent article I heard about that vi was going to be removed from upcoming Ubuntu distributions, but it appears that was an April Fools joke... <insert curmudgeon grumbling here>
The few times I have encountered nvi, it was just off enough from vim to give me a headache. Somehow it is worse than busybox vi, where I at least know to stick to primitive operations.
Since I "grew up" with vi I mostly use vi when using vim, but I do appreciate syntax coloring. I find it easier to scan comments that way and pick out constants.
i see people struggling, fighting with Intelli-J every day. I wish I could give them vim as a gift. All the extra stuff you think you can't possibly give up you don't need. I'm a professional text file editor. Vim is like playing the piano. I guess what I'm saying is learn to play the piano for real, and don't spend your life in a piano-player-helper IDE thing.
Vim is a fantastic text editor, but it is not an IDE replacement. Here's just a few IntelliJ features I use daily that Vim doesn't have: Go to declaration, find usages, rename method/class, change method signature, auto-import, shortcut to override method, easy-to-configure style rules, really good code completion, quick access to javadoc.
I could keep going. Again, not hating on Vim. I use Vim keybindings in IntelliJ! I just don't think it's the best tool for working in large codebases.
vim for command line, pycharm for python, webstorm for web, geany for everything else that needs a GUI, works great!!
used vscode for 2 years on and off, finally decided to part away two months ago and bought webstorm instead, the time spent on vscode with all the configuration and plugins and settingsync(which is not reliable) is way more expensive than webstorm's license fee(same as pycharm)
There appears to be a small issue with this article, it seems to have confused vi with the widely favored editor nano. It might be good for an editor to fix this omission as I'm sure it was in error. /s
cwbrandsma|6 years ago
All the examples listed are pretty uncommon or trivial in any of the other IDEs (aside from the regex part, which is cool, but I never want to be in a place where I have to regex my code...ever). 90% of the time I’m doing simple code maintenance, with an occasional refactoring. And I know devs that swear by vi...they are developing any faster than I am, and I touch my mouse about as much as they do (hardly ever).
My favorite is still Visual Studio with Resharper, worst is XCode.
billfruit|6 years ago
* Unlimited yanking from kill rings: ie pasting text from history of the clipboard.(This is one thing I have most difficulty with when switching from emacs to modern editors)
* Macro recording and playback : recording an arbitrary set of edit operations and then replaying them any number of times.
* two or more code frames/windows side by side, even displaying the same file Surprisingly modern IDE guis seems not designed for it, eclipse can do it but clumsily.
* Remote file editing: use the IDE tools to edit file residing on another computer.
* Column edits or rectangle edits. Selecting a vertical column or rectangle of text and copying, moving it to another place.
org3432|6 years ago
I hear about this from time to time, but have never seen it people do it successfully first hand, what I do see is silly mistakes in their checkins; incomplete variable renames, formatting is off, syntax errors, switching between browsers and their code while looking at manuals, or other obvious mistakes that can be caught inline by IDEs while you type.
brandonmenc|6 years ago
thethirdone|6 years ago
I use regex search and replace fairly often; why are you so opposed to it?
If I need to change $t1 into t1 in a group of 6 lines (something I did today), its pretty easy to just make that replacement automatically. Doing it by hand would just take longer.
> ... with an occasional refactoring
That's exactly what I use the feature for.
byte1918|6 years ago
tacomplain|6 years ago
depressed|6 years ago
Even then, the most common cases for me are searching for a string only at the beginning or ending of a line, or only searching for instances that are not part of a larger word.
adrianrocamora|6 years ago
milin|6 years ago
omaranto|6 years ago
rococode|6 years ago
For those purposes, IdeaVim works just fine, and gives me all the little speed boosts of vim with the added bonus of (in my opinion) a much more robust coding environment. It even makes some functions better; for example, `gd` works super well and nearly instantly in IntelliJ since the definitions are supplied by the IDE's 'Go To Declaration' rather than some hacky vim plugin. Other editors have similarly sufficient vim plugins, e.g. VSCodeVim.
foob|6 years ago
umvi|6 years ago
griffinheart|6 years ago
I agree with you that if you don't use a specialist tool 24/7 you'll be slow, but that is expected vi optimizes for expert users not for novice users.
In the same way that if I don't use Photoshop and then just want to do something simple in it, it's going to take me a lot of time and am probably going to forget how to do it because I don't use it enough.
0 - https://stackoverflow.com/questions/1218390/what-is-your-mos...
civility|6 years ago
Vim on Dvorak is insane, imho.
joevandyk|6 years ago
base698|6 years ago
The formula: number(Optional) action movement
Examples:
2 dl - delete two characters right
dw - delete a word
yb - copy back a word
y/foo - copy to the search foo
4cw - change the next four words
actions: yank(copy, delete, change)
movements: /(search), t(til character), f(to character), many many others (l, h, j, k, *, #, T, F)
Combine as you see fit.
anotherevan|6 years ago
dilyevsky|6 years ago
asciimov|6 years ago
* Eclipse - Forced to use this in University in the early aughts. I would say that crashing and clobbering systems was its best feature. You moved your mouse it crashed; thought about saving crash; need an update, now you need to format and clean install windows; want to print, printing works! want to compile, your gonna need to try again after restarting windows...
* SSH - In University we had some awesome terminal servers that were a joy to work with. I could access all my work from anywhere, regardless of how limited my local machine was. Vim was always there, chugging right along.
amanzi|6 years ago
I was going mention a recent article I heard about that vi was going to be removed from upcoming Ubuntu distributions, but it appears that was an April Fools joke... <insert curmudgeon grumbling here>
veryworried|6 years ago
bgorman|6 years ago
ChuckMcM|6 years ago
andrewfromx|6 years ago
greysonp|6 years ago
I could keep going. Again, not hating on Vim. I use Vim keybindings in IntelliJ! I just don't think it's the best tool for working in large codebases.
mda|6 years ago
chimpburger|6 years ago
Plain Vim does not have the semantic / refactoring capabilities of a real IDE. This plugin gives the best of both worlds.
ausjke|6 years ago
used vscode for 2 years on and off, finally decided to part away two months ago and bought webstorm instead, the time spent on vscode with all the configuration and plugins and settingsync(which is not reliable) is way more expensive than webstorm's license fee(same as pycharm)
unknown|6 years ago
[deleted]
munk-a|6 years ago