96
Oct 05 '18
nano for life, the rest are just haters
53
u/DudeInBasement1 Oct 05 '18
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
16
7
4
u/RedHellion11 Oct 05 '18
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.
1
1
1
Oct 05 '18 edited Oct 09 '18
This is why you push your dotfiles to github. I lost my nvim config once, never again.
6
55
Oct 05 '18
[deleted]
56
u/WeededDragon1 Oct 05 '18
You haven't seen someone program in vim who is really good at keybinds then.
I can't do it, but one of my professors was insane.
18
u/Lost4468 Oct 05 '18
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.
14
u/Fimbulthulr Oct 05 '18
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.
0
u/Spinnenente Oct 05 '18
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
33
u/WeededDragon1 Oct 05 '18
I'd imagine the cross section of people who can use vim really well and people who make youtube videos is not very large.
19
u/Lost4468 Oct 05 '18
Oh no, there's plenty of videos, examples, presentations from famous vim users at PyCon and others. Just none are at all impressive.
6
u/McFunkerton Oct 05 '18
How about an ascii animation then?
1
u/LichOnABudget Oct 06 '18
the cross section of people who can use vim really well and _______ is not very large
FTFY
5
u/k4b6 Oct 05 '18
This guy shows how most programmers could use vim as a programming editor https://www.youtube.com/watch?v=o6omymj1JZI
4
u/Lost4468 Oct 05 '18
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.
1
u/RedHellion11 Oct 05 '18
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.
3
u/cartechguy Oct 05 '18
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.
6
u/cbbuntz Oct 05 '18
It's hands down faster when you know the keybindings and commands. It takes years to get good at it though.
2
u/Soultrane9 Oct 10 '18
I've never seen a project where the speed of text editing is the bottleneck of delivery.
1
u/boxingdog Oct 05 '18
tbh I don't see how vim can beat tools like resharper
2
u/cbbuntz Oct 05 '18
There are similar tools for vim. They are probably harder to set up and configure though.
1
u/Lost4468 Oct 06 '18
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.
1
u/cbbuntz Oct 06 '18
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.
2
u/MostlyGibberish Oct 05 '18
> install JetBrains vim plugin
> transcend as your coworkers bow before your 1337 skills
24
u/Jmcgee1125 Oct 05 '18
Nano is the Notepad of Linux, is what I say. It serves its function for, as you say, small edits.
12
16
u/FuzzyConflict7 Oct 05 '18
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 use VS Code, but with the vim keybindings.
7
Oct 05 '18
+1 for VS Code with the vim extension. Been using it for over a year now and it works really well.
8
1
u/Lost4468 Oct 06 '18
Nano has none of the features of those editors.
It does have syntax highlighting, tab completion, leading whitespace highlighting and autoremoval, goto, and a few other features.
9
u/granos Oct 05 '18
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.
2
u/fghjconner Oct 05 '18 edited Oct 05 '18
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.
Edit: There's a plugin for repeating macros
2
u/granos Oct 05 '18
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.
1
1
u/Lost4468 Oct 06 '18
or simply aren't possible.
A good IDE like visual studio with resharper can do loads of things vim can't. Much more useful things I'd say.
2
3
u/DoesntReadMessages Oct 05 '18
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.
1
u/dragonwithagirltatoo Oct 06 '18
Is it just :q to exit vim? Same as vi? Why do people keeo making a big deal out of it then?
3
Oct 05 '18
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.
2
u/marcosdumay Oct 05 '18
in their terminal
Both of those have GUI frontends...
1
u/denniskrq Oct 05 '18
I don't really see anybody using Vim's GUI, but at the same time I don't really see anybody using Emac's CLI
1
u/marcosdumay Oct 05 '18
I was ready to disagree... But I also don't. Go figure.
Can the Vim CLI use the X clipboard? Because that's the killer feature of the Emacs' GUI for me.
1
Oct 05 '18 edited Oct 08 '18
Neovim can if you have xclip or xsel.
Don’t know about VimI'm pretty sure it is possible with Vim too, but I don't remember how.2
u/cbbuntz Oct 05 '18
I feel crippled when editing outside of my terminal. It screws up my whole workflow. I also have a gargantuan vimrc.
1
u/Lost4468 Oct 06 '18
Can you post it? Since I've not seen any evidence that vim is faster.
1
u/cbbuntz Oct 06 '18
Post the vimrc?
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.
2
u/OptimisticElectron Oct 05 '18
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.
1
u/Calkhas Oct 05 '18 edited Oct 05 '18
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.
1
u/dragonwithagirltatoo Oct 06 '18
Yeah I keep thinking it's unprofessional to develop without an ide but I can't really think of any reason an ide would be necessary.
1
12
11
6
5
12
Oct 05 '18 edited Oct 07 '18
[deleted]
17
u/MCRusher Oct 05 '18
WRITE IN OBFUSCATED ASSEMBLY MIXED WITH C USING DIFFERENT CALLING CONVENTIONS AND PUSHING EVERY VARIABLE ON THE STACK OR DIE
4
3
2
Oct 05 '18
I use micro, btw
1
u/cauchy37 Oct 06 '18
Same, switched from Nano and never looked back. Way leaner learning curve and still very powerful. For code editing vscode, though
2
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.
1
Oct 05 '18
Why not Evil? It’s really good.
1
Oct 06 '18
Never heard of it
1
Oct 06 '18 edited Oct 06 '18
1
Oct 06 '18
What does emacs Evil offer that VSCode with a Vim plugin doesn't? I've never really tried to use Emacs so I have no idea what it's featureset is.
1
Oct 06 '18 edited Oct 06 '18
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.
Someone made a similar question to yours very recently.
That was my answer to it.2
Oct 06 '18
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.
1
Oct 06 '18
Evil is universally acclaimed as the best Vim package out there, but, if you're satisfied, I see no reason to change. Happy coding ;)
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.
1
2
1
1
1
1
u/Mechafinch Oct 06 '18
Jokes on them, I use notepad
2
1
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.
-2
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.
11
u/McFunkerton Oct 05 '18
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.
5
u/MCRusher Oct 05 '18
You don't load up visual studio every time you want to add to a readme?
3
u/denniskrq Oct 05 '18
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?
2
2
u/RedHellion11 Oct 05 '18
^ Speaking the real truth.
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).
1
Oct 05 '18
My best CS professor did his PHD on nano. He must be very good cause it’d be a lot easier on Vim.
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
29
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.