My Favorite Vim Tricks

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024

ความคิดเห็น • 235

  • @GuilhermeTeixeira
    @GuilhermeTeixeira 4 ปีที่แล้ว +147

    I usually do recursion when recording a macro in order for it to keep repeating itself until the end of the file. I just start recording a macro -- say, calling it "@a" --, then I just record its commands. When finished, before pressing Esc, I call "@a" inside of itself and *then* press Esc. Voilà.

    • @GrotesqueSoulthorn
      @GrotesqueSoulthorn 4 ปีที่แล้ว +67

      We are all still living in 2020. This man is living in 3000.

    • @Spielix
      @Spielix 4 ปีที่แล้ว +20

      How do you determine the end of the recursion?

    • @xXUkanlosXx
      @xXUkanlosXx 3 ปีที่แล้ว +2

      genius :O

    • @AhmedSaleh-ws3pz
      @AhmedSaleh-ws3pz 3 ปีที่แล้ว +3

      It's a bit late but brilliant!

    • @dandandrorivolleyball
      @dandandrorivolleyball 3 ปีที่แล้ว +7

      Happens to me by accident every time i use a macro because i keep forgetting to press q again to end the macro.
      Every time it happens im like "oh yay thats so much better than repeating it manually" but now i know how to do it intentionally!

  • @alexjr181
    @alexjr181 4 ปีที่แล้ว +91

    The command “:qa” quits all open windows and buffers. Saves time not having to do “:q” over and over.

    • @bouldersky2906
      @bouldersky2906 4 ปีที่แล้ว +4

      @@makc You can also do :wa (or :wqa) to save (or close) everything at once

    • @spacewad8745
      @spacewad8745 4 ปีที่แล้ว +5

      ZA or ZZ is way better

    • @satoshi_21
      @satoshi_21 3 ปีที่แล้ว +2

      Shift + ZZ is Killer

    • @puvendranpillay3096
      @puvendranpillay3096 3 ปีที่แล้ว +1

      I tell my buffer to catch some zzz

  • @colonelburak2906
    @colonelburak2906 4 ปีที่แล้ว +30

    Nice! I'm learning vim and this was very helpful.
    Btw, "fr_ch" is Swiss French, but perhaps you knew that :)

  • @JustSomeAussie1
    @JustSomeAussie1 3 ปีที่แล้ว +20

    One of my favorite things is "permanent undo", basically if you edit a file, close it then reopen it you can still undo using u. Put this in your vimrc
    set undodir=~/.vimdid
    set undofile

    • @makc
      @makc  3 ปีที่แล้ว +1

      That's dope as hell.

  • @fruitfcker5351
    @fruitfcker5351 3 ปีที่แล้ว +3

    The downvotes are from emacs users

  • @bloodgain
    @bloodgain 4 ปีที่แล้ว +30

    One of my favorite things about Vim's macros is that they are just command strings stored in the regular named registers. So if you create a complex macro, only to realize there's a mistake in the middle, you can paste it into the document, modify the command (which is in "normal mode syntax") , yank/cut the command back into the register, and then execute it. It also makes it easy to share Vim macros, if needed, since it's just a line of text.

    • @Stefan-vz7op
      @Stefan-vz7op ปีที่แล้ว

      That is actually really cool! Thank you for sharing your insight

    • @GidzPaul
      @GidzPaul ปีที่แล้ว

      Wait what??

    • @no_name4796
      @no_name4796 5 หลายเดือนก่อน +1

      You can probably load some good macros from your config file, and then you can just use it without having to do anything lol
      Yeah vim is absolutely pure gold

  • @SheharyarNaseer
    @SheharyarNaseer 4 ปีที่แล้ว +24

    Great video! Learned about workspaces that I did not know before. Some other notes:
    1. You shouldn't use the :o (open) command, which was meant for vi compatibility. Instead use :e (edit) command.
    2. Instead of running :q repeatedly, you could do :qall (or just :qa) to completely quit vim and all open buffers.
    3. Visual block mode is so much more than just (I)nserting or (A)ppending to line items. You can also execute regular vim commands over them. For example, instead of doing the three tasks in different commands, you could do ":norm IThe \\2fjceover\\A dog" over the visual selection range and it will convert "quick brown fox jumps jumps the lazy" to "The quick brown fox jumps over the lazy dog." on all lines. (I've mapped \\ to escape here, but you could enter esc directly with ctrl+v too).

    • @MCLooyverse
      @MCLooyverse 2 ปีที่แล้ว

      Perhaps I'm misunderstanding, but also writing literally "" (less-than, capital-E, ..., greater-than) is the usual way to include an escape in something.

  • @yvrelna
    @yvrelna 4 ปีที่แล้ว +8

    Non-vim developers often thinks vim must be a text editor for writers, not software developers because it does things like paragraphs and sentence text object or spell checks which doesn't normally map very well into a developer's toolbox.
    Non-vim writers often thinks that vim must be a tool for software developer, not writers, because tools like completion, jump to tags, etc which doesn't normally fit into a writer's toolbox.
    Actual Vim users knows that both sets of developer and writers tools actually worked for each other's scenarios very well.

  • @JohnDegen_aka_Jeehannes
    @JohnDegen_aka_Jeehannes 4 ปีที่แล้ว +26

    Completion is also context aware: start with Ctrl-P and continue with Ctrl-N Ctrl-P. Repeat until you have everything you typed previously. Ctrl-X Ctrl-L works with entire lines. Enjoy!

  • @vlmath314
    @vlmath314 4 ปีที่แล้ว +141

    it's more interessting to open multiple files in buffers, and reserve tabs for multiple workspaces (set of buffers)

    • @FlaviusAspra
      @FlaviusAspra 4 ปีที่แล้ว +13

      Indeed. My advice is to use tabs to cut through logical views of your code.
      For instance, in a devops project, I would use one tab for the things running outside of the docker container, and another tab for the code which is meant to run inside a container. Use this in combination with the lcd command.
      Quick and dirty: lcd %:p:h
      % stands for current file, p stands for path, h for head, meaning the directory of the current file.

    • @nobytes2
      @nobytes2 4 ปีที่แล้ว +3

      How about tabs vs tmux panes?

    • @67fabs
      @67fabs 4 ปีที่แล้ว +12

      @@nobytes2 I may be wrong, but tmux panes will means multiple vim instances, so you won't share opened buffer between these instances.

    • @uyohn
      @uyohn 4 ปีที่แล้ว +6

      @@makc The best way to edit multiple files in vim I found so far is to install Airline plugin - it's a status line, which has a "tabline" feature - it shows all open buffers in a "tab" fashion - looks similar to what you show in video with multiple tabs. You can have a look at it here: i.stack.imgur.com/cq8D9.png
      github: github.com/vim-airline/vim-airline#smarter-tab-line
      This approach is better to what you show in the video, because what is called "tabs" in vim is actually something like "instances of vim". What people typically mean by "tabs" is something called "buffers" in vim - every file you open to edit loads into a buffer, and then you interact with this buffer. After you save it, it writes to the original file. If you open vim and then edit multiple files by running ":e file", all those buffers stay open and you can switch between them using ":bnext" and ":bprevious". The plugin I mentioned helps only by actually showing you your opened buffers in a "tab-like fashion". With this approach even sessions work - if you open a saved session, it will load all the buffers you had opened (not the case with using actual vim tabs, session only saves what's on one tab). I hope this helps :) Good luck with vim (you should probably move to neovim though).

    • @SamirAbuLina
      @SamirAbuLina 4 ปีที่แล้ว +1

      As long as all open buffers are "availible" in all the tabs, that does not make sense for me to use. If I switch buffers in a tab and can switch to a buffer that I actually use in another tab, it just has no benefits. How do you use tabs? Does it not bother you that when cycling through buffers you almost always open buffers that you actually do not want in this tab?

  • @VioletJewel1729
    @VioletJewel1729 4 ปีที่แล้ว +23

    Hey! Great video. You really hit on some of the best parts of vim. I hope it's treating you well.
    Macros are super useful, and I just wanted to give you a quick golden nugget that I use allllll the time! :D If you use @c to replay the macro stored in register c, you can use @@ the following times becuase @@ is like a macro REplay. :) Also, I use @: a lot to execute the command that I just typed into the command-line.
    I use vim nonstop, so I could go on and on and on and on and on hahaha, but I hope that these little tidbits of info prove useful to you.
    Take care, and I hope you keep making good content and help inspire others. :)))))))

    • @pmmeurcatpics
      @pmmeurcatpics 5 หลายเดือนก่อน

      I think you could also just use . instead of @@ since the former repeats the last command

    • @VioletJewel1729
      @VioletJewel1729 5 หลายเดือนก่อน +1

      @@pmmeurcatpics . only repeats one action. @@ repeats the last macro, which can incorporate multiple actions. Good idea, though :)

    • @pmmeurcatpics
      @pmmeurcatpics 5 หลายเดือนก่อน

      @@VioletJewel1729 oh, didn't know that! Thank you:)

  • @VictorRodriguez-zp2do
    @VictorRodriguez-zp2do 4 ปีที่แล้ว +5

    Don't over use macros. There are times when macros are necessary but most of the time you can simply use regular expressions which are also very powerful and many times faster than macros. Running a macro a 100 to a thousand times is very slow while using a regular expression is almost instantaneous.

  • @Jared-vq4zy
    @Jared-vq4zy 3 ปีที่แล้ว +6

    I learned a extremely useful vim trick recently that helps me greatly to organize my programming notes for various languages. It is the zf command which folds multiple lines of code into one line.
    So first I use shift-v to go into visual-block mode, and highlight as many lines as I want. Then type zf to create the fold, and za to open it, and zd to delete if I made a mistake. You can also create folds within folds, and there are other z commands such as zr to open all folds in a document and zm to close them all.
    Now it doesn't help very much as is because vim deletes the folds after you exit the file. What you need to do is add two lines of code to your vimrc.
    autocmd BufWinLeave * mkview
    autocmd BufWinEnter * silent loadview
    This makes vim autosave and autoload your view of files which remembers all your folds. Try it out!

    • @urugulu1656
      @urugulu1656 2 ปีที่แล้ว +1

      interessing autocmd... also folding commands coupled with the % for jumping to the matching brace is very useful in the programming context; closing entire comments, functions if elses switch cases you name it; very useful

  • @randomness3235
    @randomness3235 3 ปีที่แล้ว +7

    Folding is another one good one to know, ie: zf, zfap, zfip, etc. etc.

    • @MCLooyverse
      @MCLooyverse 2 ปีที่แล้ว

      And, as I just learned recently, vim has a `t` text object (like [w]ord, [s]entence, or [p]aragraph) which is (basically) for HTML [t]ags. So you can zfat ([f]old [a]round [t]ag)! It's very nice when you're trying to understand someone else's HTML.

  • @somnvm37
    @somnvm37 6 หลายเดือนก่อน +1

    here's a cool thing that I've learnt
    marks
    you can press m + any lowercase key and you'll kind of bookmark a place in your document (i think you can also use numbers, not sure)
    to go to it just do ' + name of the mark
    and the uppercase letters for spicific files, so 'V could be your vim config, and 'L could be lua config, and so on.

  • @hungrybirder
    @hungrybirder 4 ปีที่แล้ว +1

    Vim tab is not so powerful, because all tabs share the same buffers. Just use buffers in one tab. Simple and efficient.

  • @imrank340
    @imrank340 ปีที่แล้ว +1

    It seem to be self exp;aining, 1/ Trasnperant screen (-) 2/ Font size (-) so to whom he is showing this presentation?

  • @jimmyf.x.9526
    @jimmyf.x.9526 2 ปีที่แล้ว +1

    You guys are so hardcore. I just use Intellij with mouse clicks. Lol. Vim for me is strictly to view server files. But definitely learned a lot! Thank.

  • @martinstickley9573
    @martinstickley9573 4 ปีที่แล้ว +6

    I learnt some new stuff right there, so thanks for putting that all together.

  • @Maldito011316
    @Maldito011316 3 ปีที่แล้ว +1

    Great video! I had myself coming back here to get reminded of -p and :mksession

  • @Oswee
    @Oswee 4 ปีที่แล้ว +7

    +1 karma for the workspaces. :)

  • @subarutendou
    @subarutendou 4 ปีที่แล้ว +8

    I don't know i can save session! NICE!

  • @MCLooyverse
    @MCLooyverse 2 ปีที่แล้ว +2

    The problem with visual block mode is that you can only select exactly a block, so if there were line-breaks between your quick brown foxes you wouldn't be able to edit them that way. True multi cursor editing is something I've kinda wanted in vim, but the lack of it hasn't ever bothered me enough to actually learn how to get it in vanilla vim (which I bet you could), or to get a plugin for it (which I'm *certain* you could).
    Also, I say with embarrassment, I didn't actually know you *could* insert text in block mode... I always press `i`, then recall that it doesn't work, get mad, then do `:norm iblah blah blah`. I'm gonna go vmap i (uppercase 'i') (I think... or maybe I'll just learn to press shift too).

  • @Produkt_R
    @Produkt_R 2 ปีที่แล้ว +2

    fr_ch = Swiss French

  • @DonavanZegna
    @DonavanZegna 4 ปีที่แล้ว +4

    I recently discovered and subscribed. I really like your content! This is a great video, thank you. I am wondering if you've considered using VScode with a VIM navigation extension for dev projects or if you have a reason for not using VScode. Am I possibly not deep enough into my Terminal/Vim journey to understand? Thank you again for your videos!

  • @sergevinogradoff6024
    @sergevinogradoff6024 3 ปีที่แล้ว +1

    It's cool. Even before you know much about it. And then you discover plugins (vim-javascript, vim-rails, etc). And then you never use any other editors again. And then you discover that it works flawlessly via SSH and is preinstalled on every OS - and you work on files on a remote PC as if it's in your room. After which you feel pity for people who got used to other chunky IDEs (Netbeans etc.) and are stuck with them and can't do much on the remote servers on the fly. And after all that you discover, that the habit of writing Vim-scripts turned you into a Metaprogramming Guru. When others look for a button that does the right thing, you just make yourself a button or a script. And after that, you see that being a programmer for a company is stupid because when you can work x5 times faster, you don't get paid x5 times more money. And then you launch metaprogramming projects you created in Vim to be used by other people as your consumers and you make the world a better place.

  • @retnikt1666
    @retnikt1666 4 ปีที่แล้ว +3

    `fr_ch` is actually Swiss French, not generic French (`fr_fr`)

  • @josemembreno4996
    @josemembreno4996 2 ปีที่แล้ว +2

    I would like to thank you for showing me the session tip. This saves so much damn time for me! I have 4 tabs open and like 3-4 split windows each tab with a terminal on one of them. Glad to know this will save me a couple minutes of setup!

    • @makc
      @makc  2 ปีที่แล้ว +1

      Thanks for watching

  • @amgalanhuu
    @amgalanhuu 4 ปีที่แล้ว +1

    10:37 - Visual-block mode
    - get visual-block mode; - select 5 lines; - get in Insert Mode
    Typing what you want; - Exit from the visual-block mode
    End of the line changes:
    - comes to end of the line ; - get visual-block mode; - select 5 lines;
    - get into Insert Mode ; Typing what you want; - Exit from the visual-block mode

  • @janschmitt
    @janschmitt 4 ปีที่แล้ว +3

    Thanks for the inspiration.
    How come you didn't use quicktime for screen recording on OSX?
    It would bring you a higher video quality. Maybe it's just a setup thing in OBS, but the quality is very low for 1080p.
    Anyway, good job on presenting vim features.

    • @janschmitt
      @janschmitt 4 ปีที่แล้ว

      @@makc Cool. Thanks for your response. Ok, that's interesting. Never had such issues with QuickTime, but yeah, I should have rephrased that, regarding the better default quality in quicktime. I've never used OBS so I can't really judge, but the not so good video/image quality besides the very good content and audio quality just confused me :)

  • @victormartins-software3912
    @victormartins-software3912 4 ปีที่แล้ว +13

    Wow, this video alone boosted my productivity in VIM quite a lot! Thanks man :D

  • @joebenjamintech
    @joebenjamintech 4 ปีที่แล้ว +4

    very nice video man - I love vim, been using it for about 8-9 months now - still learning a lot and randomly came to ur video - nice work 👍🏾

  • @pathoslp
    @pathoslp 4 ปีที่แล้ว +2

    How did you manage to make iTerm2 look that way? 🤩 I have set up the transparent look but would like to remove the borders and tabs as well

  • @cantucodes
    @cantucodes 3 ปีที่แล้ว +3

    Great video. I love the use of macros. I could see that being useful for writing the output of common bash commands.
    I recommend also looking into the "change inner word" or "delete inner word" feature. It's revolutionary. It becomes even more powerful combined with the dot character.

    • @makc
      @makc  3 ปีที่แล้ว

      I actually remember that feature exists as soon as someone mentions it, but I always forget about it in the moment. It is awesome though.
      Thanks for watching!

  • @admiralevident8842
    @admiralevident8842 2 ปีที่แล้ว +1

    Can you share your Mac os setup as well? Window managers, spot light replacement etc

    • @makc
      @makc  2 ปีที่แล้ว

      I think this video covers most of that: th-cam.com/video/6-xur2-mf2o/w-d-xo.html
      Also when I use MacOS, I usally use Alacritty as a terminal (don't think I talked about that in the video)

  • @Korrmet
    @Korrmet 4 ปีที่แล้ว +2

    About macro.
    You can use visual mode instead of repeating macro. Press ctrl+v and select vertical line. Then press Shift+i and type something. Then press Esc. You will see what in all lines inserted same symbols as you typed. This is good way to comment blocks of code.

    • @JamesBond-jk8ot
      @JamesBond-jk8ot 4 ปีที่แล้ว

      Did you watch the video?
      11:16

    • @Korrmet
      @Korrmet 4 ปีที่แล้ว

      @@JamesBond-jk8ot to be honest, i watch it with rewinds... when i saw Makc repeating maco, i thought he missed visual mode.

  • @justintefteller2780
    @justintefteller2780 2 ปีที่แล้ว +1

    Don't forget about the range command!!!
    Seems to work better for multicursor stuff if you know regex
    :starting line number,ending line number command
    So :23,55 s/quick/fast/
    Works with standard commands like yank, paste and delete
    Also you can change the range to a % and encompass the entire file.
    :%s/quick/fast/g will change all instances of quick in the file to fast.

    • @MCLooyverse
      @MCLooyverse 2 ปีที่แล้ว

      Also, if you have an ugly JSON file (and you have `jq` installed), you can run `:%!jq` which will basically filter the file through jq, and prettify it.
      Or, if you have a set of lines (and I *do* mean lines) which are JSON, you can select them, and run `:'

  • @shawnsmith9591
    @shawnsmith9591 4 ปีที่แล้ว +2

    :tabnew will also open a new tab

  • @xXUkanlosXx
    @xXUkanlosXx 3 ปีที่แล้ว +2

    Thanks for showing me the macro feature! makes it so much more worth it using vim

    • @makc
      @makc  3 ปีที่แล้ว

      Thanks for watching!

  • @quahntasy
    @quahntasy 4 ปีที่แล้ว +3

    *Just got this in my recommendations*
    Very nice

  • @0x656e
    @0x656e 4 ปีที่แล้ว +1

    How are these command showing in the bottom?

  • @josemembreno4996
    @josemembreno4996 2 ปีที่แล้ว +1

    Custom workspaces is a feature I did not know! Damn! Thanks for the tip 😄 At work, I have like 3 tabs with 4-5 windows each and terminals. This will definitely help!

  • @Гошка-м4б
    @Гошка-м4б 4 ปีที่แล้ว +1

    As some1 said. Try buffers except of tabs
    Because tabs is not what we thinking usually. Tabs is workspaces which can contain buffers(which is just allocated memory for physical for file). And buffers is much more closer to `normal` editors tabs.

  • @damian_madmansnest
    @damian_madmansnest 7 หลายเดือนก่อน

    Stage 1: Vim allows to open files in multiple tabs 🤯
    Stage 2: You don’t need multiple tabs to open files in vim. Just use buffers 🤯🤯🤯

  • @marcotrosi
    @marcotrosi 4 ปีที่แล้ว +2

    Hi Makc,
    beautiful video. good job.
    May I ask what your connection to Germany is? (referring to the DE_DE spell lang setting).
    Also which font did you use to blend in the topics?
    Thank you
    Greetings from Germany

    • @marcotrosi
      @marcotrosi 4 ปีที่แล้ว

      @@makc Awesome. Thank you very much for responding. Have a great day and happy vimming.

  • @josephcagle
    @josephcagle 3 ปีที่แล้ว +1

    In the macro example, you can change the words even faster by selecting the word in visual block mode, going down and then hitting c to replace

  • @paulchannelstrip
    @paulchannelstrip 3 ปีที่แล้ว

    Worth reading wrt tabpages: stackoverflow.com/questions/26708822/why-do-vim-experts-prefer-buffers-over-tabs

  • @yang-linzheng379
    @yang-linzheng379 4 ปีที่แล้ว +1

    Did you use any plugin for the resize? How can you resize the tab so fast?

    • @saianishmalla2646
      @saianishmalla2646 4 ปีที่แล้ว

      You hit control + w then you use the greater and equal to sign to either decrease or increase the width.

  • @mohamedyamani8502
    @mohamedyamani8502 ปีที่แล้ว

    Great video!
    Could you please share the link to your wallpaper? The wikipedia link has a picture with a weird resolution for a wallpaper

  • @Babbler49
    @Babbler49 4 ปีที่แล้ว +1

    You can type in @@ to repeat the last played macro, like how . can repeat the last action. Very powerful.

  • @jony7779
    @jony7779 3 ปีที่แล้ว +1

    My favorite trick is exiting vim- takes a some effort to master but worth it!

  • @albert3407
    @albert3407 ปีที่แล้ว

    very interesting here the advice on how to use mksession on time 2:33, and the multi spell languages

  • @gjermundification
    @gjermundification ปีที่แล้ว

    8:49 a text synthesizer; vim has a text editor, it's called insert mode.

  • @jsd4544
    @jsd4544 ปีที่แล้ว

    trying to read that text with the frosted glass image of nietzsche or whoever is murder bro

  • @NeverCodeAlone
    @NeverCodeAlone ปีที่แล้ว +1

    Thx a lot for this!!

    • @makc
      @makc  ปีที่แล้ว

      Thanks for watching

  • @lzlxleldorado8646
    @lzlxleldorado8646 2 ปีที่แล้ว

    Best channel please continjr making more videos

  • @ayanmukherjee9744
    @ayanmukherjee9744 3 ปีที่แล้ว

    Tabs ....this is crazy...
    I not going back to vs code

  • @vijaykumarramalingam7425
    @vijaykumarramalingam7425 4 ปีที่แล้ว

    You are talking and going too fast. Noone can catch what you are saying.

  • @totheknee
    @totheknee 4 ปีที่แล้ว +1

    9:17 - forward slash*

  • @stoneHeHenge
    @stoneHeHenge 3 ปีที่แล้ว

    Tabs are useless compared to buffers and hidden buffers

  • @IkraamDev
    @IkraamDev 3 ปีที่แล้ว +1

    This is too hardcore. I’ll stick with the Vim extension in VSCode.

    • @makc
      @makc  3 ปีที่แล้ว +1

      Dope. I think the thing that really set's Vim apart is the bindings. I'm much more likely to use Atom, VSCode, or even Emacs knowing that I can use Vim's bindings in any of those apps.

  • @0x656e
    @0x656e 4 ปีที่แล้ว +1

    I recently start learning vim, I really liked and your video make me more interested in using vim. Thankyou

  • @OmarSantos
    @OmarSantos 4 ปีที่แล้ว +1

    great video and explanation!! kudos!

  • @Soromeister
    @Soromeister 2 ปีที่แล้ว

    How did you hide the window bar of iTerm2?

  • @KuntauX
    @KuntauX 4 ปีที่แล้ว +1

    How do you set iTerm2 to not having any frame including those min/max button?

    • @makc
      @makc  4 ปีที่แล้ว +1

      th-cam.com/video/eXyrTFNsdHA/w-d-xo.html

  • @sanwellbeatz1630
    @sanwellbeatz1630 2 ปีที่แล้ว

    How'd u setup iterm like that?

  • @damian_madmansnest
    @damian_madmansnest 7 หลายเดือนก่อน

    I don’t think autocompletion is more useful to developers than to non-developers. I do translation professionally with vim, and whenever i have a term or name than spans several words repeated in the text, like company or product names, contextual C-xC-p saves a load of typing!

    • @makc
      @makc  7 หลายเดือนก่อน

      I have noticed that it comes in clutch for general purpose writing quite a bit as well. Might have been wrong to make that statement in the video.

  • @canonpi
    @canonpi 4 ปีที่แล้ว

    Visual block mode is just like a macro

  • @virgiliomurilloochoa2884
    @virgiliomurilloochoa2884 3 ปีที่แล้ว

    what is your background bro

  • @gruelingpine1857
    @gruelingpine1857 2 ปีที่แล้ว

    @MAKC I've been searching for the longest time to find a way to remove the title bar from Mac applications. What did you use to remove it? Links and references appreciated.. Thanks in advance

    • @makc
      @makc  2 ปีที่แล้ว +1

      It’s sort of application specific. I think I’m using Alacritty there & it’s just a line in the config that stops MacOS from rendering the title bar.

  • @jimmyji8339
    @jimmyji8339 3 ปีที่แล้ว

    you speak really quick...

  • @GabrielSantana-hb8dp
    @GabrielSantana-hb8dp 3 ปีที่แล้ว

    Vim or Neovim, What to use?

  • @MrYomantanepali
    @MrYomantanepali 4 ปีที่แล้ว +1

    how do you resize your window that quick?

    • @mamunurrashid5900
      @mamunurrashid5900 4 ปีที่แล้ว

      There is a plugin in github github.com/ahonn/resize.vim
      with this you can resize with shift+arrow keys.

  • @sherryreese3576
    @sherryreese3576 4 ปีที่แล้ว

    Caspar David Friedrich, at last, a man of culture. One thing bothers me though, the heck is with the display of your powerline characters in iTerm2? Please go to iTerm2 -> Preferences -> Profiles (then select your profile) -> Text... and then check '"Use built-in Powerline glyphs". Thank you.

  • @josefschmid7713
    @josefschmid7713 ปีที่แล้ว

    Hey, how did you get your iterm2 window to not show the "bar" with the red green and yellow buttons at the top? I really enjoy that minimal look.

    • @josefschmid7713
      @josefschmid7713 ปีที่แล้ว

      Nevermind, I found it. To anyone wondering: Go to iterm preferences > profiles > (Choose your default profile) > Window > Style: No Title bar

  • @nickshv8727
    @nickshv8727 ปีที่แล้ว

    hope you discovered neovim

  • @MichaelButlerC
    @MichaelButlerC 4 ปีที่แล้ว

    Hey I have a quick question. Why does control commands, such as Ctrl n for the autocompletion, show up as capital letters? ^N instead of ^n for example. I know the ^ represents "Ctrl" but ^N would sound to me like "Ctrl Shift n" but it's actually just Ctrl n.

  • @zastanawiacz
    @zastanawiacz 2 ปีที่แล้ว

    Can I ask you how you do this zoom effect in video? I want to do the same when I make my video tutorial.
    This is great idea.

    • @makc
      @makc  2 ปีที่แล้ว

      Scale up part of the video in post

  • @stefouy
    @stefouy 4 ปีที่แล้ว

    Not fr_CH = Switzerland french. Even if I don't think this makes a difference. If you want to do this the right way, simply -> fr_FR

  • @mikewhy709
    @mikewhy709 4 ปีที่แล้ว

    People more familiar with macOS may reckognize vim's "visual block" (C-v mode) as "Column Select" (opt+mouse). If you're looking for true multi cursor, there's always github.com/terryma/vim-multiple-cursors.
    When it comes to completions, you're in for a fun ride :). Something like github.com/dense-analysis/ale can handle language servers, along with linters and formatters. There is also github.com/neoclide/coc.nvim, which is much more intense, but very powerful.

  • @mysyntax1311
    @mysyntax1311 3 ปีที่แล้ว

    that Interstellar reference 😲

  • @Microphunktv-jb3kj
    @Microphunktv-jb3kj 4 ปีที่แล้ว

    For new people, useful info -> Vim is around 14 years old and a lot of the codebase shows it. ... Vim runs through every plugin on at a time to initialize, while neovim is asynchronous and can startup multiple at the same time. Vim also uses a language called VimL (sometimes called vimscript) where as Neovim can use Python, Lua, Ruby, etc.

  • @achimwasp
    @achimwasp 2 ปีที่แล้ว

    If this video won't pull people over to vim probably nothing will. Well done!

    • @makc
      @makc  2 ปีที่แล้ว

      Thanks for watching

  • @manoerina1873
    @manoerina1873 2 ปีที่แล้ว

    never thought vim can do all this stuff without plugins, it’s vim btw.

    • @makc
      @makc  2 ปีที่แล้ว

      Thanks for watching!

  • @dandandrorivolleyball
    @dandandrorivolleyball 3 ปีที่แล้ว +1

    I've been using visual studio code for a couple of years now but after installing linux on my laptop a few months back i started watching youtube videos related to linux and everyone keeps talking about vim. Today i understand why, and thanks to this video i will start replacing vs code in vim because once you get good at it, it is so much better...
    I watched a dozen videos on vim but this one was by far the best one and the one that gave me the motivation to switch to vim. Hopefully with hard work and repetition i will become a vim master and will be able to write a 10 minutes worth of writing code in another text editor in less than a minute in vim :)

    • @makc
      @makc  3 ปีที่แล้ว +1

      Just do vimtutor over and over again. That’s the best way to get started

    • @dandandrorivolleyball
      @dandandrorivolleyball 3 ปีที่แล้ว

      @@makc i actually started that im on lesson 3 now (dont have much time to spare cause of the university but i am trying)

    • @makc
      @makc  3 ปีที่แล้ว

      Awesome. Once you get familiar with it, it’s easy to run through vimtutor everyday in like 10-15 minutes as a refresher

    • @dandandrorivolleyball
      @dandandrorivolleyball 3 ปีที่แล้ว

      @@makc love that idea! I might just do that

  • @urugulu1656
    @urugulu1656 2 ปีที่แล้ว

    your visual block mode append to the end would have worked within the first visual line in the front as well
    you can Ctrl V 10j in the beginning of the line do your insert and do Ctrl OA to get into execute-a-single-normal-mode-command-now-mode and use A to get into insert at the end of the line mode and then just continue typing. (obviously esc in the end and then your gonna get each of the two actions both performed at the selected lines)

  •  4 ปีที่แล้ว

    fr_ch is actually swiss french, not really from France, so not sure that's the one most people will be looking for.. :)

  • @johannbauer2863
    @johannbauer2863 4 ปีที่แล้ว +4

    That background image gives me german lesson flashbacks... :D

  • @Vaishravana07
    @Vaishravana07 3 ปีที่แล้ว

    I was totally blown away my the macros . thanks for that and
    the thing you told about multiple cursor to make changes to 1 or more lines doesn't work in my case
    can I get some help?

  • @oswwwaldotc
    @oswwwaldotc 4 ปีที่แล้ว +1

    Great, thank you!!!

  • @joakim57
    @joakim57 4 ปีที่แล้ว

    Visual block mode does compare to multi cursor editing. Multi cursor editing lets you drop cursors arbitrarily or by a regexp which is quite a bit more useful than just editing several adjacent lines in the exact same column-position.

  • @theena
    @theena 3 ปีที่แล้ว

    New comer to vim - thanks for the tips. I have already started using the mksession and file explorers. That multiple cursor thing was mindblowing though.

  • @camilotello3296
    @camilotello3296 2 ปีที่แล้ว

    I loved this video c:

  • @CreativeJE
    @CreativeJE 4 ปีที่แล้ว

    😎😎 it's awesome

  • @maclarel
    @maclarel 3 ปีที่แล้ว +1

    This was great - thank you!

    • @makc
      @makc  3 ปีที่แล้ว

      Thanks for watching 👌

  • @wvovaw3052
    @wvovaw3052 4 ปีที่แล้ว

    I was searching for an exit command to close Vim but all I found was a Vim tricks videos... So this is how I stayed in Vim and started using it.

  • @whdesign
    @whdesign 4 ปีที่แล้ว

    Maybe you should try spcevim[.org]. Nice video.

  • @jesusabelardorodriguezreyn4412
    @jesusabelardorodriguezreyn4412 3 ปีที่แล้ว

    Good video, I read the book "practical vim" and this video is a summary of the best tricks contained in the book.

  • @mateusztocha9260
    @mateusztocha9260 4 ปีที่แล้ว +2

    try doom-emac this will blow your mind ;)

    • @joakim57
      @joakim57 4 ปีที่แล้ว

      This. Vim seems archaic (in a bad way, not in the "cool unix-y way") when compared to doom or spacemacs

    • @KevinJohnMulligan
      @KevinJohnMulligan 4 ปีที่แล้ว

      Does it have the *entire* feature set of vim?

    • @mateusztocha9260
      @mateusztocha9260 4 ปีที่แล้ว

      @@KevinJohnMulligan I can't say if it has, because I don't know whole vim enviroment, but evil mode is prettey neat. Generally all movment, memory registers (for copy, paste) working, surround, searching, multicursor etc, and has some snippets (ofc you can customize almost everything) . I'am programing typescirpt, node js, C++, Python have even dap-debug working w witch node, chrome debugger, gdb, and can be used by vim keybinds. Only things with .Net Core is sometimes difficult because lack of debugger ;/ but with C# Unity (Mono ) without any problems.

    • @joakim57
      @joakim57 4 ปีที่แล้ว

      @@KevinJohnMulligan Depends on what features you mean. You can't evaluate vimscript, but you can perform ex-commands, g-commands, visual/visual block and such. Really, sometimes I forget I'm even using Emacs, the vim-mode is that good

  • @rafafini
    @rafafini 4 ปีที่แล้ว

    How do you resize the split using the arrows?!? Thanks