Something similar just happened to me recently. Never used VIM before but then I started learning Haskell and doing some web dev with it and I needed a good text editor for it, my first instinct was to use VSCode but doing the switch between editor and terminal became bothersome. Since I've been using VIM to edit the source files I don't have to reload the project manually, it's all done automatically :D. Now for the question haha, what have been your go-to resources for learning it and using it effectively?
Thanks for sharing your experiences. I use forums like this, online articles and I have been a member of Pluralsight since it was Codeschool, that is mainly where I learn and practice new skills. I have started Udemy very recently which is also very resourceful.
There are a few keystrokes that can be used to exit vim depending on the situation and the task. To simply exit the editor you can type (in command mode) :q
But after you finish your editing tasks, you might want to save your work before you exit, you can use the following key combinations (make sure you are in command mode) :w to save and :q to quit. you can combine both to save and exit at once with the command :wq
There is another situation that I daily find myself in, where the command :q! which allows to exit without saving, comes handy. Sometimes when opening a file with the command vim namefile, misspelling the name file for instance, will tell vim to create a new file with the misspelled name while opening, so I basically have to force quit the editor as mentioned above.
I have been watching online tutorials and I have been following courses on Pluralsight then one day I have decided to challenge myself and use vim on a daily basis, I have used to complete my school assignments and personal projects. I am not a pro but I have managed to understand the basics.
Thank you for your question. Yes indeed. I have watched a youtube video recently regarding terminal based file managing possibilities with vifm and I can't wait to play around with that.
It's pronounced Diane. I do data architecture, operations, and backend development. In my spare time I maintain Massive.js, a data mapper for Node.js and PostgreSQL.
I am still learning and every new trick surprises, I am amazed by the key combinations, it adds that level of precision to your commands without the need to leave the keyboard.
As I am adopting vim very early in my career, I m not quite sure what I am missing besides the basics GUI dependencies and the burning temptations to use the mouse from time to time 😆.
Well, I'd say precision and productivity. Vim really makes one feel like a text surgeon (I've read that somewhere 😁), it takes you to the core of text editing and makes task completion simple and fast.
The fact that it can be called anywhere from the terminal makes the perfect tool for system admin. For instance, I am running a Wordpress site, after every theme update, I would face an issue within the wp-settings.php file, I had to log in cpanel from the browser find the file and edit it there or download, edit then upload. Now I only have to access the server with ssh, locate the file, open it with vim, edit, save and voilà... task is completed within seconds.
I have read about many plugins but I am only using syntax highlight so far. I am taking my time to progressively master vim and will implement other plugins at a later time.
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
I refer to vimtutor from time to time and when you take a step back to look at it, it is even more interesting for, you still do have to leave the terminal.
As I have said earlier, coming from a GUI, it's hard not to be tempted to use the mouse, this is my daily struggle 😄.
Top comments (28)
Something similar just happened to me recently. Never used VIM before but then I started learning Haskell and doing some web dev with it and I needed a good text editor for it, my first instinct was to use VSCode but doing the switch between editor and terminal became bothersome. Since I've been using VIM to edit the source files I don't have to reload the project manually, it's all done automatically :D. Now for the question haha, what have been your go-to resources for learning it and using it effectively?
Hi,
Thanks for sharing your experiences. I use forums like this, online articles and I have been a member of Pluralsight since it was Codeschool, that is mainly where I learn and practice new skills. I have started Udemy very recently which is also very resourceful.
Ahhh the good ol' CodeSchool I loved that one. Thanks for the reply, I'll look into Udemy for that.
Resources
Gamification
tmux + vim = productivity++
The real NEO
vim plugin manager
slack so you never have to leave your terminal
😱 😱 😱 Thank you for the resources, I will dive in this weekend and keep you posted.
How to exit vim?
scnr
Welcome to team vim, I love this piece of software
Hello,
There are a few keystrokes that can be used to exit vim depending on the situation and the task. To simply exit the editor you can type (in command mode) :q
But after you finish your editing tasks, you might want to save your work before you exit, you can use the following key combinations (make sure you are in command mode) :w to save and :q to quit. you can combine both to save and exit at once with the command :wq
There is another situation that I daily find myself in, where the command :q! which allows to exit without saving, comes handy. Sometimes when opening a file with the command vim namefile, misspelling the name file for instance, will tell vim to create a new file with the misspelled name while opening, so I basically have to force quit the editor as mentioned above.
Cheers
If you haven't changed anything in the misspelled file, you can just :q to quit.
Because there was no change at all. I somehow redo my changes back to blank and press :q otherwise.
Thanks for the long answer :D never thought to get a serious one there
😀 Thx.
I have been watching online tutorials and I have been following courses on Pluralsight then one day I have decided to challenge myself and use vim on a daily basis, I have used to complete my school assignments and personal projects. I am not a pro but I have managed to understand the basics.
Do you feel like you're going to want to use VIM for everything? Like browsers, or any desktop app?
Hi Andy,
Thank you for your question. Yes indeed. I have watched a youtube video recently regarding terminal based file managing possibilities with vifm and I can't wait to play around with that.
Cheers
If you haven't, check out surfingkeys!
Hey,
Just added the extension. Thank you! ☺️
Welcome to team VIM
Thanks Andrew.
What's one thing that's surprised you about learning vim?
What aspects have been quick to pick up, and where are you still feeling the pain of adoption?
Hello Peter,
I am still learning and every new trick surprises, I am amazed by the key combinations, it adds that level of precision to your commands without the need to leave the keyboard.
As I am adopting vim very early in my career, I m not quite sure what I am missing besides the basics GUI dependencies and the burning temptations to use the mouse from time to time 😆.
What would your argument be if you were trying to convince someone to switch?
Hello Ben,
Well, I'd say precision and productivity. Vim really makes one feel like a text surgeon (I've read that somewhere 😁), it takes you to the core of text editing and makes task completion simple and fast.
The fact that it can be called anywhere from the terminal makes the perfect tool for system admin. For instance, I am running a Wordpress site, after every theme update, I would face an issue within the wp-settings.php file, I had to log in cpanel from the browser find the file and edit it there or download, edit then upload. Now I only have to access the server with ssh, locate the file, open it with vim, edit, save and voilà... task is completed within seconds.
Congrats! VIM is indeed amazing... But have you discovered any useful plugins to enhance your experience? Such as syntax highlight and reformatting?
Hello Nick,
I have read about many plugins but I am only using syntax highlight so far. I am taking my time to progressively master vim and will implement other plugins at a later time.
Thank you
Did you use vimtutor or a system like Vim Adventures to learn it, or did you dive in headfirst?
What have you found to be the most difficult or confusing aspect so far?
Hi there,
I refer to vimtutor from time to time and when you take a step back to look at it, it is even more interesting for, you still do have to leave the terminal.
As I have said earlier, coming from a GUI, it's hard not to be tempted to use the mouse, this is my daily struggle 😄.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.