Why I'm Still using Vim in 2024 - A Brief Introduction and Demo
Вставка
- Опубліковано 8 чер 2024
- ►Find full courses on: courses.mshah.io/ FULL VIM COURSE AVAILBLE
►Playlist here: • C++ and Pybind11
►Join as Member to Support the channel: / @mikeshah
►Lesson Description: A quick introduction to VIM motivating you to learn VIM. The full course linked at courses.mshah.io provides step-by-step lessons to get started in VIM.
Some of the things that we learned:
- saving (w), and exiting (q) vim
Understanding their are different modes in VIM
The four most common modes that you will use:
- insert mode ('i' is one way to enter)
- normal mode (esc)
- command mode (colon)
- visual mode (v)
moving around in VIM (h,j,k,l and arrowkeys)
undo/redo of changes (u and Ctrl+r)
visual mode (v)
yank (y)
cut (x)
paste (p)
delete (d)
block mode (Ctrl+V)
Line Navigation
w,e,b,0,$,o
Screen navigation
zz - center cursor
Ctrl-u, and ctrl-D
Shift+(H,M,L) to move to the sreen
Search and replace text
/s/foo/bar/g
/phrase_to_search
Splitting Windows
:vsplit and :split
Getting help in VIM
:h or vimtutor
tabe: opens the tab editor
split and vsplit
00:00 Introduction
00:34 Launching VIM (Vi IMproved)
01:55 Insertion Mode
02:37 saving and exiting VIM
03:42 VIM quick demo of a few features
13:17 Wrap up and more motivation for Vim
►UA-cam Channel: / mikeshah
►Please like and subscribe to help the channel!
►Join our free community: courses.mshah.io/communities/... - Наука та технологія
Same here. I use a mostly vanilla vim. I've been using vi since my college days. I like to use the power of regular expressions to change parts of code quickly.
I think Vim works better on American keyboards, though. On my (portuguese) keyboard, the * is next to P and requires Shift, or else on the numpad. Same for /, which is on Shift+7 or numpad. Parentheses, square brackets and curly braces are all on the numbers from 7 to 0, using Shift or AltGr. Many other useful symbols are also on mod keys. It's generally a little harder to write code or commands in these keyboards because of that.
But then a few of Vim's default shortcut keys don't work on my keyboard, and when I tied Vim tutorial I couldn't go pass a certain point because of that. That's one reason why I don't use Vim. Another reason is the fact that I do tons of typos. I suspect working with commands might be a bit difficult for me. :)
Another reason is that Sublime does most of what Vim does, but with shortcut keys, which I personally think is more practical. So I pretty much haven't ever found a reason to change. I only tried Vim mostly for curiosity.
Sublime allows quite a lot of editing efficiency, but I'm personally not on board with the idea that editing speed matters for productivity. Most of the time coding is spent thinking, rather than writing code, so all the micro-speed-gains in text editing are negligible on the grand scheme of things, if they make any difference at all. And scrolling the mouse doesn't make one less productive, unlike some people think. At the end of the day, what makes you productive is your proficiency with whatever editor you're using.
Fair and well stated. The difference in keyboard is indeed difficult, even if keys are remapped I imagine. I think with VIM (or any editor), being able to become a power user can improve productivity. As you say though, true productivity is in the power of our minds 🙂
Been using vim motions for everything that requires typing. Neovim for notes, programming and document writing. On windows machines vs{code} and jetbrains products have addons that emulate vim motions well enough, but the most important thing for me is it makes typing fun, its like a minigame finding a new optimal way to edit a portion of text. Using ex commands beyond saving/quitting is like *magick*
I always enjoy spending time learning new productivity tricks with VIM 🙂
The best use case for vim, in my personal experience was really useful for working on remote server as you said.
Working code on one machine may experience issues on another, in this case vim + gdb were lifesavers.
At a past job I did lots of remote work, so it became essential 🙂
Thanks, greatly enjoyed the video and learned a few new tricks!
Cheers!
Thank you so much for taking time to make these informative videos. God bless you.
Cheers!
That's why YOU (the watcher/listener) should use Vim in 2024 ;)
Again a reason I ❤ u ... Gfx, Linux and then vim on top...
Oh, did I forget shadow of Mordor pattern?!😂
@@VoidloniXaarii
Hi Mike are you planning on covering ranges in your STL series?
Yes, will eventually add to this series: ua-cam.com/play/PLvv0ScY6vfd8j-tlhYVPYgiIyXduu6m-L.html
Thanks Mike!
Cheers!
Do you use vim or neovim? vanila or plugin?
Sir pls start dsa
That is likely the next new playlist once I finish this series
Do you use any plugins? or just vanilla vim.
Pretty vanilla, I do like the 'context' plugin, and I've used previously used some for intellisense: ua-cam.com/video/IR6pfkqjbw8/v-deo.html
I use vim only in Linux, but in mac or windows pretty strugle .
I see you video of how to install intell sense, automatic Aide or what name : LSP : language server for c++,
C++ very vast and too much features, Should be have special Vim++.
Haha vim++ indeed needed 😜
IMHO using plug-ins defeats the purpose of using ViM; I avoid them as much as possible. What if you find yourself in an environment (remote server, ad-hoc workstation), and you need a ViM session (no plug-ins installed), then you risk of not being able to perform your operations (anymore), as you depend too much on these plug-ins.
I tend to use a pretty vanilla vim as well. I like the context plugin, and there are probably a few more good ones (e.g. intellisense) that are worth having that could work remotely as well if you want a similar environment across the board.
I regularly remote into devices that only have VI or vim tiny. It doesn't affect me in any way to have a laptop with neovim and LSP. Your brain can cope if my smooth surfaced brain can. Having said that for many years I used a very minimal Vim setup with just ctags to help navigate C++ files.
Looks cool but complicated
Takes a little practice, but after 1-2 hours you can get the hang of it. Vimtutor(free) or my course at courses.mshah.io explain some of the mental model so it makes more sense 🙂
Using neovim.
Nice!
Emacs will never be as fast as Vim (for those who can live with switching modes all the time) but it will always be better. Vim will never have an Org Mode for one.
And i also reckon Emacs is easier to customize than Vim... you are only dealing with Elisp rather than Vimscript, Lua, blah blah, and what ever they add next
Both have pros and cons, but the advantage with these text editors is they allow you to become power users.
@@MikeShah yep, go and study the Emacs Lisp Reference Manual and gain real power 😉👍
I am using nano though 😂
Everyone needs to know at least one terminal text-editor, and nano passes :)
Real pros use pumch cards... Screens just get in the way.
It’s called punch card. Did you type it in vs code? 😜
@@bruno-zl9qnyeah... it's a vs code extension....
🤣
Emacs is best!!!
They forced us to use emacs in college (we had a half page cheat sheet, but no instruction otherwise), and then I switched to visual studio 🤣 A few years later I decided to try VIM because folks said you could be more productive, and it stuck while I was doing lots of work through ssh. 😁
@@MikeShah😂