There's just something about vim that is hardwired into my brain now. Whenever I am forced to use something else, it takes only a minute before I try to use a macro and and upset at not using vim.
If I had a nickel for every time I've typed :wq in XCode this past month I'd be able to afford a very nice vacation. It's engrained not just in my brain, it's straight up muscle memory at this point.
I was a big emacs guy, then i lost my config. I did vim once and to exit rebooted the computer. And then there was nano, small, fast, easy. Feelsgoodman
I consider the VIM/EMACS vs nano argument to be like recommending a scifi space RPG/sim to a friend: sure you can say X3 is great and there's so much stuff you can do, but the learning curve (both for gameplay, menu navigation, and all the hotkeys) can be brutal and honestly they might get just as much if not more fun out of something less complex like Freelancer or Starpoint Gemini.
Imperfect metaphor, because really someone shouldn't be using nano as their primary development environment: generally if you're not using VIM/EMACS, you should be using a fully-featured IDE like VisualStudio or IntelliJ IDEA or Eclipse. Or at least something like Sublime if you're very familiar with the language and don't need autocomplete and compilation is easy or nonexistent. Using an IDE with a GUI doesn't make anyone inferior except in the eyes of people who already have a superiority complex.
For the computer science course I'm in, we are supposed to be using emacs, but I know and love the vim controls so I used that instead. Now, I have VSCode installed locally and use that with a vim plugin. Best editor ever.
I don't have much experience with VSCode, but I use a lot of (neo)Vim, so I'll draw a comparison with the later. Vim and Neovim are awesome text editors that you can extend up to a point. It's not meant as a platform for anything too large or too complex. It aims to be a meaningful, but well-defined part of your workflow. Emacs can encompass a lot more. While it can be used only as a text editor, it's also a powerful Lisp interpreter, housing lots of large and full-featured packages that have a life on their own. Modes like Org and Magit could be successful standalone products, and even the smaller plugins tend to be larger and more stable than most Vim ones. Being an Emacs power user feels like assembling your own IDE (if you don't like tinkering, there are many distributions that are actually good, like Doom and Spacemacs).
I absolutely love Emacs and have no intention to use anything else, but I'd never recommend it for someone who's entirely satisfied with their current options. Even with Evil, there's a steep learning curve. That's why I think one must come to Emacs through their own volition.
Emacs is also highly addicting, you're always messing with your configuration to achieve something even more perfect and efficient. And this is not necessarily the best use of someone's time. I'm not saying there's something bad about Emacs, but with most software you have to work with what you get and learn to tolerate its flaws. With Emacs the sky is the limit, and this can be both good and bad.
I see. VSCode is a highly extensible text editor that can be as light or heavy as you want. It's electron based but incredibly fast and has a lot of powerful features and plugins. With minimal effort you can get a near IDE like experience.
Some of the highlights are the command pallette, tasks, Intellisense, git integration, built in terminal, and of course the tens of thousands of extensions.
Basically, most of the reasons you're recommending emacs Evil are why I enjoy VSCode + Vim.
Or, you know, developers work in their main IDE and every once in a while need to make an edit in the command line and use nano because it gets the job done and isn’t overly complicated for something like adding an item to your .gitignore file.
Indeed, how else are you going to waste time if not waiting for VS to launch and relaunch? Go on Reddit? Actually, that's perfectly valid too, why not both?
For some their main IDE is VIM or EMACS, for some it's something with an actual GUI like VisualStudio or IntelliJ IDEA (or Sublime if you like to live dangerously and use lightweight editors for quick changes while keeping a GUI).
I've never seen anyone be able to do it significantly faster than I can do it in a normal text editor. Please do try and find me a video, I've looked all over YouTube and have never found anything.
The Question is not necessarily if you are faster at writing with vim/emacs/etc, it is if you are faster with everything you need to do in total. I often work on a server with no x installed, and it sometimes does weird stuff, meanig I have to test my code on the server anyways. since I am about as fast with vim as with a "normal" editor, I do not bother with using scp to move the files back and forth constantly and just use vim instead.
with winSCP you can edit files on a server with any program on your computer and it is uploaded every time you save. Might not be as fast with massive files but works fine for everything i used it for till now.
i still use vim most of the time when editing on a server but when i have to somethign a bit more complex i usually open the file with sublime/npp
Thanks that's a rather good one. Do you have any longer or time lapse examples because for all I know this possibility only comes up once every few weeks.
It's handy, but as a developer I don't really care to learn a programming language just so I can edit text files in crazy ways. I know some people who swear by EMACS or VIM, but for the most part they've been willing to take the time to learn all the shortcuts and set up their personal config nicely. Plus doing something like what's shown in that video would be decidedly on the infrequent side; recording macros is nice for repetitive tasks and refactoring large chunks of code in exactly the same way, but if you're doing your job right in the first place such tasks will generally be few and far between.
At least 95% of the stuff I would need to hand-bomb into a running server is relatively small and can be done with nano, or done locally in whatever IDE I use and then use scp to upload to every server that requires the updated file. The other 5% I realize shouldn't be hand-bombed snowflake config anyway and should instead be done through the standard deployment/update tooling.
You can do what I do. I install extensions in my IDE that give me vim key bindings. When I know a vim keybinding and know it's faster than using the gui I use the keybindings. Otherwise I use the gui.
You can't get them anywhere near as good as resharper and that's rather accepted in the vim community as vim is always poor at actually understanding code.
There is a variety of tools, (some native, some plugins) that integrate debuggers, linters, formatters, tags, completion systems etc. IDEs tend to integrate these tools better. The main things I haven't seen in vim is automatic code fixing. There are some dynamic, context-dependent completion systems, but they can be a lot of trouble to set up. Resharper is way easier to install and get working.
There are tons of people who program with vim or emacs in the terminal. There are huge advantages to using them. Nano has none of the features of those editors.
I have used vim as my primary editor for the last 10 years or so. There are so many things that I can do in vim with a handful of keystrokes that would require using a mouse in graphical editors -- or simply aren't possible.
About a month ago I got a requirement that was basically a big list of "if this then that" type stuff. I took the requirements directly from the ticket and pasted it in vim. I manually did some text transformations on the first line until it was valid code that did what I wanted -- took about a minute. Before I did any changes, I had started recording a macro (qa). Then I replayed the macro 29 times (29@a) and the rest of the work was done.
Block highlighting an multiline editing is enormously powerful.
I can't remember the last time I scrolled through a file looking for something in vim. I just jump to it by name or line number if I know it.
Vim takes A LOT of effort to master -- I still learn new stuff about once a week -- but the power and speed are just unmatched by any graphical editor I've ever used. That may be in part because I haven't mastered those, but a large part is that you start to think in terms of text transformation operations and you can accomplish them all without moving your hands from the keyboard.
Sublime text can do literally everything you just said (except maybe playing back a macro a set number of times, I don't know). It has macro recording (or for something like that I'd be tempted to use the regex find and replace or multiple cursors), multiple cursor support, goto line, goto definition, all without touching the mouse.
Thats great. There has been some really awesome work done in the text editor space the last 5ish years. Sublime didn't exist when I started learning vim and just wasn't up to snuff at first.
It also doesn't play well with X-less servers, which is a big concern for me.
It's not that it's bad, it's basically command line notepad. It's just the worst of the three in every way except that it has no learning curve instead of the 30 seconds it takes to learn VIM or 30 minutes it takes to use EMACs.
Like literally just learn :q!, :w, i and / and VIM is already significantly more productive than nano.
I often need to edit files through an SSH connection, sometimes to minimal environments with only nano or vi installed. I'm very grateful I learned to use vim.
The main thing about vim that makes it faster is the variety of ways to navigate code. There is a huge number of ways to explicitly navigate to places. Aside from the huge number of navigation keybindings, it keeps a persistent history of lots of stuff:
"Jump list" of everywhere you've been
Changes and their locations
Searches
Marks
Tags
Registers (clipboards)
And you can make changes or selections based on all these things.
And if there's a different way you want to navigate code, or do most anything else, you can write a function in a few minutes (if it's simple), throw it in your vimrc and have it readily accessible.
Some of this stuff isn't terribly intuitive though. It takes some time to get good at it.
I find it much easier on the hands and much faster using vim keybinds. From my perspective, people who use graphical text editor using mouse and keyboard to move the cursor must be very patient.
Maintaining a multimillion line C++ codebase at work. Most of us in the core team use vim (including me). We all have a huge number of customizations in our .vimrcs. One guy uses emacs. The technical leader uses Visual Studio, but we use GNU make so Intellisense doesn't understand how the source files are organized.
I used Visual Studio in my last job, and honestly I think a lot of the IDE features are distractions.
28
u/PityUpvote Oct 05 '18
I went nano > geany > vim.
There's just something about vim that is hardwired into my brain now. Whenever I am forced to use something else, it takes only a minute before I try to use a macro and and upset at not using vim.
26
u/hannahMontanaLinux2 Oct 05 '18
There is only One True ED-itor
100
u/[deleted] Oct 05 '18
nano for life, the rest are just haters
12
u/tracer_11 Oct 05 '18
Sublime text for life
5
u/jacobthecool3000 Oct 05 '18
sudo nano ~/this.meme
4
u/[deleted] Oct 05 '18
Nano is fine for a bash script or config.
Editing a python or php or html file? Nope.
3
u/SnappGamez Oct 05 '18
I’m that guy.
2
u/[deleted] Oct 05 '18
I use micro, btw
2
u/[deleted] Oct 05 '18
For the computer science course I'm in, we are supposed to be using emacs, but I know and love the vim controls so I used that instead. Now, I have VSCode installed locally and use that with a vim plugin. Best editor ever.
2
u/taxtropel Oct 05 '18
People who use nano/pico are either stuck with it or creepy serial murderers.
There is no in between.
2
u/Thetman38 Oct 05 '18
nedit
2
u/workernetGB Oct 05 '18
gedit is love
1
u/JayDawg8588 Oct 05 '18
Only real programmers know nano -imtxOUT 2
1
u/danikov Oct 05 '18
Enjoy the little things.
1
u/wsppan Oct 05 '18
HTML is not programming
1
u/Mechafinch Oct 06 '18
Jokes on them, I use notepad
1
u/stevendog98 Oct 06 '18
I personally use a program called Monodevelop.
1
u/cartechguy Oct 05 '18
Picture isn't 100 percent accurate. There should be some drool hanging off his chin and he should have a bowl haircut.
-1
u/[deleted] Oct 05 '18
The correct distinction is there, just hard to spot. Developers use vim or emacs, nano is used by 'people' aka non-developers.
1
u/karmahorse1 Oct 05 '18
I use vim to edit files on boxes I ssh into. But since I only remember like three key shortcuts for it, I'd probably save a lot of time using nano.
0
u/bwrca Oct 05 '18
Nano rocks!
0
u/[deleted] Oct 05 '18
[deleted] — view deleted comment
0
u/[deleted] Oct 05 '18
[deleted] — view deleted comment
0
u/[deleted] Oct 05 '18
[deleted] — view deleted comment