I’ve come to the conclusion, people who use vim just continue to do so out of a stubborn sense of pride for finally learning the key combinations.
It’s just convenient that it’s pre-installed on many servers.
So I can use it now everywhere with my stubborn sense of pride for finally learning the key combinations.It’s not pride, it’s just that I know how to use it really well and that makes it easy for me to use.
But it’s really only for viewing files on another system over SSH. For local work I use Sublime Text
I just use vi
Is that stupid? It’s all I ever bothered to learn, hasn’t failed me yet. Now I’m not some big time linux guru but I’m a sysadmin and regularly find myself elbow deep in a CLI for stuff.
I honestly learned it just because I hated having to change hand position to use a mouse.
Can you use a mouse in nano? I always just use the arrow keys, or page up/down and home/end
I mostly use vim but I barely use the jkl; to navigate the document.
Ah sorry, I meant using Vim in a GUI program. I wanted something with the flexibility of a mouse (quick navigation, context menu actions, etc.) without using a mouse. Using just the arrow keys, shift highlighting, etc. is just too slow when writing lots of text, and it doesn’t follow the natural position of typing.
Even if you use arrows, you still have to reposition your hand.
That’s funny, I feel the same way about Excel users.
What do you mean? The vim users know their key combinations pretty well, that’s kind of the point of vim.
In my case it’s not a sense of pride. I can’t use anything other than Vim because I keep accidentally putting random incantations into my word documents.
“There once was a dduuuZQ:q!”
haha, same. do you use vimium as well?
Ya know, I might throw that on to my browser but I doubt I’d actually use it much. I only really use my browser for research; notes, music, and most of my work is done in the terminal. Being able to swap tabs faster by not having to cycle could be useful, but other than that I find the mouse to be a pretty rapid way of navigating unfamiliar pages
in my case, my hand hurts if I use mouse(or a mobile phone) for some time. using
j
/k
for scrolling and clicking links viaf
help me a lot.
That extension is actually pretty cool. There is also tridactyl and a browser that was made with vim in mind, but a browser and a text editor are too different for many things to translate.
thanks for sharing, I’ll try it on my work machine
I mean, yeah, kind of. In the same way pilots fly planes out of a stubborn sense of pride for knowing what all the flight deck controls do.
There is no sense of pride. Every text/code editor has key combinations that many users will learn eventually. Vim has easier key bindings.
I am faster, more comfortable, and more productive in Vim. I use the same keybindings in all my editors and IDEs. It’s okay for people to have different preferences.
Somehow it seems this would apply to any linux user
Vim (or emacs, or any other advanced text editor) is much easier to use than nano when you need to do something more complex than type couple of lines.
(…once you learn the bindings)
And how often does that happen in the real world?
VIM may have been a very useful tool 20 or 30 years ago, but today it’s nothing else but a tool for one’s sense of superiority. It’s the vinyl of editors.
If you have to type that much code in a terminal, your infrastructure is outdated. Simple as that.
VIM may have been a very useful tool 20 or 30 years ago, but today it’s nothing else but a tool for one’s sense of superiority. It’s the vinyl of editors.
So, because you don’t understand something, it’s outdated?
If you have to type that much code in a terminal, your infrastructure is outdated. Simple as that.
Ok, I can see you have no idea what you’re talking about.
I understand it very well. And that’s exactly why I’m writing this.
Ok, I can see you have no idea what you’re talking about.
Then say, grandmaster delusion, what purpose does vim serve, where it is actually the best tool? Writing code? Hardly, it’s way too limited and requires a ton of upfront investment and headspace. Writing config files? Hardly, because if you write these by hand, you’re living in the 90s, that’s what Ansible, Terraform etc are for.
You just don’t want to admit, that vim is nothing more than a habit. Muscle memory.
Yes it’s so outdated that mostly every IDE offers usage with its keybindings.
Every day in my case, except holidays.
…so your infrastructure is outdated.
You seem to believe that people only use the terminal if they HAVE to. I doubt anybody these days HAS to type any amount of code in the terminal, but choose to anyway. Like probably anyone else I have access to modern tools and infrastructure, but I choose to do work in the terminal because I’m more productive there. I use (neo)vim because I like it more than any other text editor I’ve used, and have no problem writing code and debugging in the terminal.
You’re using the terminal, because you’re used to it. It is not the better tool, it’s simply what you happen to know already.
People who argue with productivity because of some key bindings live in the world of the 80s. You don’t just sit there and type code 12h a day, that’s not how modern software development works.
And all those blockheads down voting me are caught up in their weird superiority complex. They are the powerful superhackers, and don’t understand that we are just highly qualified plumbers.
I’m actually fairly young and wasn’t around in the 80s. I graduated college with a CS degree in the past 5 years, where I was exposed to many different tools and software. What did I come out of that experience with? I like the terminal more than any IDE I had to use in any class.
Now in the real world, we don’t always get to use our favorite tools for every task, obviously. I do need to use other, more enterprise, software from time to time for work. But whenever possible I go to the terminal because I’m faster there, and I can quickly automate things.
I’m not saying the terminal is the best tool for every job, I’m just saying it is the best for ME. Notice I’m also not putting down other tools here. It seems to me like you might be the one with a superiority complex.
No, I’d argue you simply didn’t want to invest in the other tools.
Think about it, you probably spent hours on customizing and automating vim, and then say you’re faster in that. Well, that’s called a habit.
IDE are objectively more powerful and since you can actually see options and navigate quickly, you don’t need to memorize every obscure feature.
All the terminal editor enthusiasts are actively holding us back, because they insist everything outside vim is garbage for enterprise and kiddies.
If your tool of choice is actively hostile to new users for no reason other than “that’s how it’s always been, and thus it’s better”, well then you’re digging a moat to automate your gatekeeping.
vim + terminal is actually objectively more powerful than any IDE, and most IDEs include a way to pull up a terminal as a crutch for things they can’t do. In any case It seems you can’t be reasoned with. Your argument is just a strawman about what you say other people are saying.
Better? Maybe!
More efficient? Surley!
But easier?! Hell no! Easy means you can use it without a lot of training or studying. It is self explanatory. And there is no way on earth that vim is easier than nano. I don’t need to know anything to use nano I need to check docs for hours before I can even start using vim
This makes it seem like jerking off to MILF porn is hard because there is a learning curve
It is easier after you learn basics. Learning is not easy, but usage is.
Well okay by that logic playing Beethoven on piano is super easy
No, some piano plays are still harder than others, mo matter how long you practice. Editing text with vim is easier than with nano after some practice.
If something is “easy to use” this includes the time you need learn said thing.
Drinking rahmen from the bowl is easier then using chopsticks (even if you are more elegant with chopsticks)
Driving automatic is easier then driving manual (even if you may be more efficient with manual if you practised shifting a lot)
Walking is easier then flicflacs (even if you may be faster with flicflacs if you practised a lot)
Using Ubuntu is easier than using arch (even if arch gives you more control and opportunities if you understand it)
A handful of shortcuts isn’t that hard
Right, it’s remembering them and using them efficiently that’s hard. It’s amusing watching coworkers try to flex in vim and then struggle at the most basic tasks.
nano friends rise up!
I like Nano. I think it is quite good. There, I said it.
Edit a file, writing a quick shell script or whatever in the terminal. Nano is great. I don’t see any use in learning vim or emacs. If I need something more I’m going use a gui editor anyway.
Don’t get triggered anyone it’s just my preference
This is my thought process exactly.
I get it, for a power user, vim is probably incredibly powerful. However, I just want to edit text files. I don’t want a text editor where I need a cheat sheet just to save my changes and quit.
Funny, that’s what I hate about Nano. The key binds seem completely random to me and the programs solution to this is to display a cheatsheet on the screen
Well hello there!
I too use nano.
alias nano="vi -y"
ln -sf /bin/nano /bin/vi
Just tried it in my terminal and I couldn’t exit, lol
sorry, i didn’t tell how to quit. it’s
ctrl+q
Thanks, I finally got my access to the terminal back.
Looks like you only got one so far.
There are dozens of us!
nah you’re wrong
Why do you all say that? There were no replies when I added mine so that’s why I said what I said.
Isn’t this supposed to be VIM vs Emac? What’s is there point to be programming in the terminal anyway? Nano is good to fix some config files while your are in there, but if I needed to do real programming I’ll be finding something that works in the GUI.
Did you just say GUI?
More like ewwwie.
Its GNUI
What you’re referring to as GNUI, is in fact GNUI/Linux, or as I’ve recently taken to calling it, GNUI plus Linux.
GNUssy
supposed to be VIM vs Emac?
30 years ago it was vi vs everything. I don’t see it changed today.
Efficiency.
There’s 0 chance if you have to pick up your mouse that you can keep up with a Unix gray beard.
That’s just editing, if they’re from the emacs era there might be nothing you can do with text faster across their whole system.
I like vscode as a entry point, but if you care to get faster learning just vim motions and sys utils alone is going to cut time from the process.
Oh it’s about speed. What’s the one that get your brain to be faster at programming? I use 4 fingers typing and am still typing much faster than I can think.
It’s speed, but it’s also flow and a continuous stream of thought. If all your editing is being done with muscle memory and minimal thought, you can continue thinking about the problem at hand rather than interrupting your thoughts process to fumble through some context menu to make a change.
Definitely worth running through vim tutor at least once.
It’s beyond typing speed, things like piping out strings to utilities is using one program to write another, you aren’t just getting faster because of access, it’s a paradigm shift.
Edit just for fun: im a non Dev dummy who happened to grow up in a Unix household. Even having dropped vim for helix and bounced around the MS admin/Apple IT space for 30+ years. When I switched to Linux I could still remember binds I’d set up and last used at 9.
Kinda like riding a bike.
I like nano tho it has some strange shortcuts
micro has some improvements and default shortcuts that are much closer to common GUI text editors
oohh that is nice, I think I’ll swap my nano to that.
Average vim user: vim is easy.
Also average vim user: literally hours of reading tutorial pages on how to use vim.
It is easy, though? I cannot even use it correctly. I just know some of the commands and that if you hold down shift it goes backwards.
Vim makes it easy to edit text in complicated ways, once you’ve learned it.
Vim is not easy to learn nor intuitive.
It is simple and compounding.
You might not ever edit enough text to ever need to learn a new skillset to edit text. If that’s the case, use
nano
.But if you do find yourself editing a lot of text, consider trying
vimtutor
.It takes 20 minutes and you’ll be proficient enough to match
nano
’s efficiency ceiling.I’m a vim user and I would say it’s not. It’s very powerful, but only once you become familiar with the commands.
Nano is a better default for the average user because it works in a way most users would expect for a text editor to work.
Honestly, these days it’s pretty simple. The thing you need to remember is that you do not need to know EVERYTHING all at once. Learn a little bit, use it, keep what you use, discard what you don’t, get it in muscle memory, and learn a bit more. Very quickly you’ll be zooming through vim.
You can learn the basics, and go from there- the basics of vim (which imo everyone should know- vi is often the fallback editor), and then you can just casually learn stuff as you go.
Here’s the basics for modern default/standard vim: Arrow keys move you around like you expect in all ‘modes’ (there’s some arguments about if you should be using arrow keys in the vim community- for now, consider them a crutch that lets you learn other things). There’s two ‘modes’- command mode, and edit mode.
Edit mode acts like a standard, traditional text editor, though a lot of your keybinds (e.g. ctrl-c/ctrl-v) don’t work.
Press escape to go back into command mode (in command mode, esc does nothing- esc is always safe to use. If you get lost/trapped/are confused, just keep hitting escape and you’ll drop into command mode). You start vim in command mode. Press i to go into edit mode at your current cursor position.
To exit vim entirely, go to command mode (esc), and type :wq<enter>.
‘:’ is ‘issue command string’,
‘w’ is ‘write’, aka save,
‘q’ is quit.
In other words, ‘:wq’ is ‘save and quit’
‘:q’ is quit without saving, ‘:w’ is save and don’t quit. Logical.
Depending on your terminal, you can probably select text with your mouse and have it be copied and then pasted with shift-ins in edit mode, which is a terminal thing and not a vim thing, because vim ties into it natively.
That gets you started with basically all the same features as nano, except they work in a minimal environment and you can build them up to start taking advantage of command mode, which is where the power and speed of vim start coming into play.
For example ‘i’ puts you in edit mode on the spot- capital i puts you in command mode at the beginning of the line. a is edit mode after your spot- capital A is edit mode at the end of the current line.
Do you need these to use vim? Nope. Once you learn them, start using them, and have them as muscle memory, is it vastly faster to use? Yes. And there’s hundreds of keybinds like that, all of which are fairly logical once you know the logic behind them- ‘insert’ and ‘after’ for i/a, for example.
Fair warning, vim is old enough that the logic may seem arcane sometimes- e.g. instead of ‘copy and paste’ vim has ‘yank and put,’ because copy/paste didn’t exist yet, so the keybinds for copy/paste are y and p.
The second most important thing about vim to learn is:
If nothing is behaving then you probably have caps lock on.
Allow me to present to you my Ultimate Guide to Emacs.
You can learn Emacs in one day. Every day.
It’s extremely easy to get started
gedit supremacy
I started on Emacs and then didn’t use it for a few years and forgot everything so now I’m stuck on Nano. But that’s fine because nano does everything I want it to do.
Nano is my “daily drive”, but I’d use vim as well – takes a couple seconds to search for “how to type in linux vim” and “how to save a file in linux vim” anyways. :^)
I know
i
and:wq
and that’s all I ever plan on learningNot even Basic Command-Count-motion like c3w aka change 3 words after cursor, or d3b delete 3 words before the cursor?
To that, you add the D aka delete command C for change Y for yank (copy)
So yy to yank line, or dd to delete line.
Also p for paste
Also, i sends you before the cursor, a sends you after. Capital I is insert at beginning of line, Capital A is insert at end of line (append).
I terms of motions and moving around, you need: hjkl, C-d and C-u (half page jumps down and up), and within the line: 0 or ^ for beginning of line, $ for end (taken from regex), w for moving by word forwards, b for moving by word backwards. That’s pretty much all you need imo. There is also t and f. Where t goes forwards (think 'till aka until). Like dtc delete until the c character. F is the same but goes backwards in the line rather than forwards. Remember you can use these with xommands, so d$ deletes until the end of the line. Or “dt.” deletes till the “.” so… yeahI know there’s more, but that’s all you need for Normal and Insert mode imo.
For Visual mode, you only need to know how the Visual modes work. Visual (v), Visual Line (Shift-v) and Visual Block (Ctrl-V).
Also, for visual mode, it might be helpful to learn how to use V-Block to comment out multiple lines at once. Can’t be bothered to go into it.
But I’d argue that’s all there is to learn about vim keys in terms of getting work done.
Not gonna lie, once you’re getting past single button combos, I’m mentally checking out. Ctrl+K and Ctrl+U in nano are good enough for me, and if I need to do something more complex like actual coding, I’ll use an editor with a full GUI as well.
Fair enough. I basically gave you a large chunk of vim so it will feel super overwhelming. The trick is to do one command or combo at a time. For example, I started with dd. Then I added yanking. Then I added visual mode. Then I added “o” (which I think I forgot to mention: o creates a newline under the current one and puts you in insert mode. Capital O does the same but above the current line). The real trick is going little by little. And to be honest, there are some commands I still rarely use or forget to mention. I’ve never used f instead of t. And in terms of forgetting to mention, there’s the x command which deletes the single character under the cursor rn.
Also, I’m sure someone will find this list helpful, so on top of this, I’ll also add this video (and hope that Piped bot will appear): https://www.youtube.com/watch?v=RSlrxE21l_k
It contains some things I haven’t mentioned.
As for learning all this, I’m repeating myself for the third time. Do it little by little. And when a command is already a thing you do almost without thinking about it, you’re ready to add more.
I’m mentally checking out
Why? dw is delete word, c5b change 5 words backwards, and those are the most complicated commands you’ll ever get to use, unless you start adding cuatom keybinds.
But I digress. If you don’t want to learn it, it’s fine.
You noobs. I just use combinations of cat piped to sed to edit my files, which are mainly lisp code.
cat pipeing is safer though.
foobar > file and your file is gone.
You can always alias
to
<
in your shell.
<file foobar
Huh does that actually work? Don’t have a system handy to try it out.
I think so! I think it’s something like
< file
works anywhere in the line, not just the end. There may be some specifics about no space when it is the front but I don’t remember lol.storage/documents/programs ro > echo puts "hello world" > main.rb storage/documents/programs ro via rb > ls c js main.rb python storage/documents/programs ro via rb > < main.rb grep hello puts hello world storage/documents/programs ro via rb >
Amateur! I write my code down on a piece of paper, scan it in, send it to my computer through email, then make a custom-built AI read the paper and print it in the terminal!
M-x M-c butterfly
Link.
For vim I had to config or install something just to be able to COPY something to use outside vim, how backwards is that? Isn’t this the most standard feature one can expect to work as default?
it actually does work by default, you just probably missed how to do it in the help pages in vim. For those curious, the system clipboard is its own named register in vim (
:help registers
to learn more) and can be accessed with either“*
or“+
depending on your how your system is configured.To copy a line:
”*yy
or”+yy
To paste a line:
”*p
or”+p
You mean you couldn’t copy some text from vim and paste it into another application? if yes, what did you have to install/configure for that? I’ve never had any issues copy paste from/to vim, console/GUI windows/Unix.
Sadly I don’t remember. Sometimes it comes preinstalled, sometimes not, depending on OS or something. (Maybe Manjaro gnome). I could copy and paste inside of vim, but not to/from outside vim.
Easy is relative. What are you trying to do? Replace a value in an yaml file? Then nano is easier. Trying to refactor a business critical perl/brainfuck polyglot script in production? Then you probably want to use vim (or emacs if you are one of those people)
Honestly, roll back to previous release for production and use best IDE your developers are used to on their local machines, test the fix in a non production environment then release to prod. When is editing business critical scripts in production really needed?
It was a joke to make the point that vim can be the easiest tool to use if you are trying to do a complex task.
Replacing a value in a config file is still easier in vim due to e.g.
ciw
orci"
being a thing.
stop using nano, if you want a non modal editor use
vim -y
Uh, just trying non-modal vim for the first time and… how do I quit it? I can’t :q.
Uh, just trying non-modal vim for the first time and… how do I quit it? I can’t :q.
I’ve never tried modal vim because I’ve only just heard about it. The next thing I’d try is restarting the computer. Or Ctrl + Q whichever’s easier.
Ctrl-q
and then if it asks to save, type “no, fuck you”
On my laptop, I update my bashrc on Excel, in Wine, then export it as a PDF, OCR to .md, Pandoc it to an .Org, and then finally, write it down on paper and re-type it on my phone’s Termux’s Emacs instance, then TRAMP it to my PC, in the other room.
I use biebian, btw.
Micro, hell yea!
Made the switch as well thanks to the modern key bindings