How to Do 90% of What Plugins Do (With Just Vim)

Поділитися
Вставка
  • Опубліковано 21 лис 2024
  • Vim is big; so big that it does some very useful things that are often overlooked. Plugins can buy us a lot of functionality, but they can add a lot of burden in the form of dependency complexity. In this talk, we'll explore some of the tradeoffs we can make between plugins and "vanilla" Vim features that achieve similar results, including:
    autocomplete (VimAwesome, YouCompleteMe)
    file jumping (FuzzyFinder, Ctrl-P)
    visual filesystem navigation (NERDTree)
    build integration
    snippets
    The "slides" and supplemental vimrc are available here: github.com/mca...
    Learn more from the developers at thoughtbot ⌨️
    Head over to tbot.io/dev-blog to read more great articles on our blog.

КОМЕНТАРІ • 480

  • @MrMollmann
    @MrMollmann 8 років тому +1834

    0:06:48 - finding files
    0:16:14 - tag jumping
    0:24:33 - autocomplete
    0:34:30 - file browsing
    0:38:20 - snippets
    0:51:02 - build integration
    0:57:40 - questions
    1:09:12 - plugins to use

    • @RifazNahiyan
      @RifazNahiyan 8 років тому +32

      ^ The Real MVP from the comments.

    • @victornaut
      @victornaut 7 років тому +31

      You're amazing, you deserve to be happy and be successful in life you amazing butt-saving son of a bitch!!!

    • @Uch33z3
      @Uch33z3 7 років тому

      qazwsxed you could just use a variation of the snippets trick i.e. make a mapping that takes you to the beginning of the line, insert the comment and go back to normal mode.
      You can even autocmd that mapping so it matches the commenting style of different file types

    • @emi7671
      @emi7671 7 років тому +2

      MrMollmann

    • @JorgeMartinez-xb2ks
      @JorgeMartinez-xb2ks 6 років тому +1

      Love ya

  • @driden1987
    @driden1987 8 місяців тому +12

    It's 2024 and I still keep coming back to these thoughbot vim talks (also some of the emacs ones). I don't know if these still exist, if they don't please bring them back, they're great

  • @bgbong0
    @bgbong0 3 роки тому +466

    It never fails. The speaker at a "Mastering Vim" will always have at least one moment in the live lesson where they say "Oh wow, I didn't know you could do that..." Just shows how deep the vim rabbit hole goes, and how learning-mode brain is so much more different than get-normal-work-done-mode brain.

    • @yash1152
      @yash1152 3 роки тому +3

      where in this vid?

    • @magnehansenm9164
      @magnehansenm9164 2 роки тому +10

      @@yash1152 31:35 to 33:00 i think 😄

    • @typeer
      @typeer 2 роки тому +9

      @@yash1152 in vim

    • @peterheijstek5288
      @peterheijstek5288 Рік тому +2

      ​@@yash115229:03

    • @HtotheG
      @HtotheG 11 місяців тому +2

      Add 26:59 no hate but I have been using vim for a few months and it feels good that even experts are always learning

  • @jasonxoc
    @jasonxoc 5 років тому +200

    This video and "Mastering the vim language" are my two favorite videos on vim, both from thoughtbot. After using Vim for about 2 years I still watch these videos from time to time when I'm bored.

  • @porcellinoveille
    @porcellinoveille Рік тому +3

    The best vim video I've ever watched. I learned tons of new features and worked on my vimrc file for hours to make it lighter. Now I am confident with help files and I can confirm that every single visit through these pages is an opportunity to be amazed again by the quality of this software. Love vim more and more

  • @DeanGadberryYT
    @DeanGadberryYT 11 місяців тому +2

    I love this talk. I return to watch this video so many times because I continually forget that VIM is MASSIVELY extensible. Thank you for sharing this with us!

  • @reverseila4363
    @reverseila4363 4 роки тому +34

    After watching videos like this, one thing happend to me is that i now feel i can read help files more confidently. For very beginners, one should start with videos like these or even more simple, rather than reading through help to find ins and outs of everything.
    One of the best vim talks/tut videos i have watched. Thanks

    • @himanshushukla787
      @himanshushukla787 4 роки тому

      Yeah I agree

    • @Linuxdirk
      @Linuxdirk 2 роки тому

      I use vim since around 10-15 years and I was ${today} years old when I learned about ^n

  • @handdarahanddara-nr6fu
    @handdarahanddara-nr6fu Місяць тому +1

    Wow, love this talk, also this guy is a good presenter and so far he’s really good at answering questions and making sure he checks in with the person to make sure he got what they were asking for, very humble 10x dev it seems

    • @changemewtf
      @changemewtf 6 днів тому

      Thank you!! More like 0.5x probably but no one's complaining yet ... 😁

  • @ECRandomBits
    @ECRandomBits 3 роки тому +7

    The quick-fix window is way more powerful than it looks. You can write a compiler plugin (:h write-compiler-plugin) or :set makeprg + :set errorformat to a carefully constructed expression that can parse any error you want. Then :make does a lot of magic, calling your makeprg, parsing with errorformat, filling up the quick-fix and opening the first error.
    BTW. this video was the reason why I made the final move to VIM. Really cool stuff!

  • @heliooliveira1809
    @heliooliveira1809 8 років тому +32

    For the question of how to select completion without leave insert mode, ^n ("n" for next), ^p ("p" for previous), and ^y for yes accept selection :)

    • @kafeltz
      @kafeltz 8 років тому +2

      thank you

    • @hergelqendov8878
      @hergelqendov8878 6 років тому +6

      For those (like me) who want to cancel the completion, use CTRL-E (see :help 'complete_CTRL-E )

    • @howuseehim
      @howuseehim 22 дні тому

      You are still using vim ?

    • @heliooliveira1809
      @heliooliveira1809 21 день тому

      @ yup I can’t exiting

  • @noelevans
    @noelevans 5 років тому +75

    As a vim beginner / intermediate this talk is fantastic. Thank you!

    • @kirschkern8260
      @kirschkern8260 4 роки тому

      What Microphone was used here? (Standing byside the Laptop)
      Brandname,model, or Type of Microphone) would be very helpfull if somebody can tell :)

    • @howuseehim
      @howuseehim 22 дні тому

      5y ago 😂 are you an expert now?

  • @Zen-lz1hc
    @Zen-lz1hc 2 роки тому +1

    The only regret I have is that I didn't start to use VIM earlier in my life.
    I was so stubborn...
    I love VIM now, and I can't see myself using any other code editor.
    I configurated VIM to my dream editor, you can literally make it do anything!!! Love it.

    • @nate0-rh6eh
      @nate0-rh6eh 3 місяці тому

      What’s terrible is that now the only ide that will feel at home is one that has a vim plugin

  • @blank2707
    @blank2707 4 роки тому +43

    27:24 "some of the default bindings use ctrl-x, I have no idea why?"
    I'm like 80% sure the completion stuff was partly written by an emacser who was
    experimenting with the "dark" side. C-n, C-p, C-x.

    • @0LoneTech
      @0LoneTech 3 роки тому

      A particular detail about ^x^n is that you can keep going. It picks not just a word to complete, but a place it came from, so you can use ^x^n again to get the next word after that, etc.

    • @pepijnkrijnsen4
      @pepijnkrijnsen4 3 роки тому +4

      80% of a good autocomplete plugin is to turn into sensible keybindings. Completion in vanilla Vim is fine - it's the chords that annoy me.

  • @denisdubochevalier2829
    @denisdubochevalier2829 7 років тому +36

    Great talk, thanks ! As to tags matching, you can also (at least in c, c++ files) type ^W ^I on any tag to open a new window with the actual definition (may it be in a header or in the file itself). If you look for #defines only, you can type ^W ^D.

  • @shmottie2hottie
    @shmottie2hottie 8 місяців тому +2

    The question asked at 31:37, the command to exit the auto completion suggestions without editing what you have entered and to stay in insert mode is ^e. Also, to select the current suggestion you are on in the auto completion list is ^y.

  • @maxmeranda
    @maxmeranda 7 років тому +7

    Hey Max, if you are still wondering about the answer to the question at 31:36, the answer is CTRL-E. :help complete_CTRL-E (this is a bit "duh" but don't worry, it is about 2 paragraphs down from where you were looking at :help ins-completion 27:38 ) Anyway, if the mystery isn't solved, then as you said, the manual is very nice. :)
    Thanks for the talk, btw.

  • @Linuxdirk
    @Linuxdirk 2 роки тому +1

    Understanding tool that we use ... This is so damn important!
    While people might now to click this, than that, than that other thing and then enter tis text there and this works 90% of the time they just can't cope with things not working like they memorized and sometimes not even know what they're doing at all. All they know is to follow a step-by-step instruction sheet instead of understanding what they're doing.
    Those people often think I'm some type of tech genius, but what I really do is trying to understand our tools instead of simply memorizing the order of buttons I need to click.

  • @ThisGuyRocksLikeCrazy
    @ThisGuyRocksLikeCrazy 7 років тому +281

    I definitely agree with everyone. This is one of the best talks i've seen on vim.

    • @kirschkern8260
      @kirschkern8260 4 роки тому +1

      What Microphone was used here? (Standing byside the Laptop)
      Brandname,model, or Type of Microphone) would be very helpfull if somebody can tell :)

    • @Obi222
      @Obi222 4 роки тому

      @@kirschkern8260 Looks like a Zoom H4N recorder. It has a built in stereo mic.

    • @dibakarbehera7177
      @dibakarbehera7177 4 роки тому

      @@kirschkern8260 nnn

    • @thingsiplay
      @thingsiplay 4 роки тому +4

      I must say the audience was really good too.

    • @HaseenKhan-jn1og
      @HaseenKhan-jn1og 3 роки тому

      @@kirschkern8260 uuu6uyuuh juung uyiuuuhi uiuuuut unuuuuuuumujmu uuu5uu. W

  • @theena
    @theena 3 роки тому +4

    Great talk. I watched this as a beginner. Now four months later, I even understand what he is saying.

  • @marcello4258
    @marcello4258 3 роки тому +1

    the bonus at the end really got me.. i wrote a script to toggle the opacity on/off in the terminal now i can bind it easy in vim without the need to bind it globally :)

  • @NostraDavid2
    @NostraDavid2 2 роки тому +2

    RE: Why Ex mode?
    Remember that (Neo)vim's existence goes like ed -> ex -> vi -> vim -> neovim, where each successor is a superset of the previous implementation. ed was a line editor, ex enabled better commands, vi added a visual mode where you could see the whole file at once, and the rest we're probably familiar with.
    Ex mode enables you to string a bunch of ex commands (anything with a : at the start) to enable people with REALLY shitty internet to remotely edit files, without having to keep a constant open connection.

  • @FerrumCorde
    @FerrumCorde 4 роки тому +6

    Man I was in as soon as you started talking about overlooked tools being a priority. I'm all about that. I'ma have to watch a bunch of these

  • @lsagar
    @lsagar 5 років тому

    No matter how good you are at using vim, you still have so much to learn about. Vim is just mind blowing tool.

  • @daxtheducknotaffiliated
    @daxtheducknotaffiliated Рік тому +2

    Holy shit, this is gold! Literal pure gold!!! I think the fuzzy search part is honestly the coolest - I will never use Telescope again :)

    • @vorrnth8734
      @vorrnth8734 10 місяців тому +1

      I will keep using telescope. It is much more versatile and waaaayyyyyy faster.

  • @cognishn
    @cognishn 5 років тому +12

    Easily one of the best vim talks I've ever seen!

  • @johannesberger8641
    @johannesberger8641 3 роки тому +2

    12:45 Holy shit. I'm writing my thesis right now, where I use vimtex and the chapters are in multiple files. To change between files, I would constantly do ":ls" to see the buffer number of the file, and then an additional ":b buffernumberoffile"
    thank you man

  • @bernard3690
    @bernard3690 Місяць тому +1

    via experimentation i discovered a lengthy auto completion list can be navigated w/ the traditional up/down arrow keys after pressing Ctrl so that it is not necessary to repeatedly press the Ctrl n or Ctrl p chords .

  • @cosmicsound6466
    @cosmicsound6466 4 роки тому +9

    Hot tip for netrw. The banner that you hid IS the tutorial. So don’t hide it until you re familiar with the commands.
    Go up to the help line and press enter to see different options

  • @wolverine9632
    @wolverine9632 2 роки тому +5

    I love how vim is even its own version of PowerPoint.

  • @TrailHacker
    @TrailHacker 2 роки тому +1

    Great talk, Max! I am a big vim guy (or at least consider myself a big vim guy) and learned a lot from this talk. This morning I've simplified my .vimrc drastically per your teachings. I feel like a noob again. Thanks again!

  • @Alexander_Sannikov
    @Alexander_Sannikov 5 років тому +195

    29:02 :
    dude: let's just put a slash there and see what happens! oh hey it works!
    audience: WOOOW
    damn nerds :D

    • @nobytes2
      @nobytes2 5 років тому +11

      I ain't gonna lie I'm impressed when I'm in vim when doing stuff lol it's just amazing

    • @L0j1k
      @L0j1k 4 роки тому +21

      I went to the timestamp to laugh at the nerds (spoiler alert: anybody landing on this video about vim is a nerd). Then I saw what he did, and was so impressed by what I saw, I hit rewind and watched the whole muthafuckin video.

    • @pradhumnkanase8381
      @pradhumnkanase8381 4 роки тому +1

      @@L0j1k lol

  • @ark5458
    @ark5458 3 роки тому +2

    48:51
    just for reference, this is one of the coolest things i've seen

  • @chalmagean
    @chalmagean 8 років тому +19

    You could also "cancel" the entire complete thing with Ctrl-w. It will delete the entire word and keep you in insert mode.

    • @kirschkern8260
      @kirschkern8260 4 роки тому

      What Microphone was used here? (Standing byside the Laptop)
      Brandname,model, or Type of Microphone) would be very helpfull if somebody can tell :)

  • @hannessteffenhagen61
    @hannessteffenhagen61 4 роки тому +3

    The reason you'd want completion plugins beyond what ctags does is for more accurate completion and goto definition/declaration things. For example, ycm will give you a list of members if you type struct_value.; ctags based completion can't do that. And particularly important for C++, this also lets you jump to declarations that are outside your project.

  • @ridespirals
    @ridespirals 6 років тому +2

    in response to the question about the strategy for keeping ctags updated: writing a couple git hooks (on pull, merge, rebase, and commit) make it super simple. you can also have it write the tags file into the .git directory, so it won't need to be ignored and vim already knows to look in there for the tags file (actually maybe it's fugitive that does that).

  • @TheChele2
    @TheChele2 4 роки тому +3

    Really awesome talk. One minor thing I noticed is the shortcut for ambiguous tags @23:26 is actually g] rather than g^], at least in my version of vim.

  • @kafeltz
    @kafeltz 8 років тому +52

    These questions should be subtitle in the video, it would help a lot.

    • @kirschkern8260
      @kirschkern8260 4 роки тому

      What Microphone was used here? (Standing byside the Laptop)
      Brandname,model, or Type of Microphone) would be very helpfull if somebody can tell :)

    • @Don_XII
      @Don_XII 4 роки тому

      @@kirschkern8260 it's probably one of the zoomcorp.com products.. I'm not sure of the name of the model though.

    • @ralesarcevic
      @ralesarcevic 3 роки тому

      @Peter Mortensen most probably talking about the viewers question to the presenter

  • @neniugrava
    @neniugrava 7 років тому +2

    Cscope is like ctags on steroids for c/c++. You can jump to callers, callees, definitions, and so on (with the same syntax), and it is also supported out of the box.
    I highly recommend the Sneak plugin. It adds a motion between f/F and / that lets you search forward/backward for two-character combinations to jump to. With the streak feature enabled it will mask multiple matches with a single character tag, so you can jump anywhere with 4 keypresses.
    Also, for normal old vim ctrl-g displays the current filename ;P

  • @Argletrough
    @Argletrough 4 роки тому +2

    For Quickfix, you can use
    :cope[n]
    and
    :cw
    to open an IDE-style quickfix window.
    Use
    :ccl
    to close the window.

    • @AlexanderVlasov
      @AlexanderVlasov Рік тому

      shortening :copen to :cope is brilliant, I have to admit

  • @himanshushukla787
    @himanshushukla787 3 роки тому +4

    This person is just brilliant at teaching

  • @d3javu1978
    @d3javu1978 3 роки тому +1

    just got here, wish i got here a couple of years ago! great stuff thank you!

  • @johnnyphoney5669
    @johnnyphoney5669 8 років тому +16

    I think every vim-guy should watch this video, at least to see on it in different way.

  • @simonchan5400
    @simonchan5400 Рік тому +3

    Love this video,the ** option combines with find command is really awesome,it replaces my fuzzy find plugin.

    • @vorrnth8734
      @vorrnth8734 10 місяців тому

      Not for me. It is way too slow.

    • @simonchan5400
      @simonchan5400 10 місяців тому

      @@vorrnth8734 It is slow when the directory has too many files.I usually set the path to be something like “src/**” so that it will only search files inside the specific folder.

  • @Cowboydjrobot
    @Cowboydjrobot 2 роки тому +5

    This is great. I think plug-ins are awesome! But my work environment has to be super security conscious, being able to do cool stuff without external plugins is hugely helpful to me. It’s a huge hassle to request permission to download and install software so I don’t have the luxury to just pull down whatever I feel like to see if it works

  • @lordofenron
    @lordofenron 5 років тому +2

    Wow! I have seen this video like 4 times and each time there is something I have been thinking about. Last time it was the fuzzy search and this time its the snippets - I _really_ like your way of using vim!

  • @beepst
    @beepst Рік тому +1

    This guy is hilarious. I love his sense of humor. Awesome talk!

  • @cweagans
    @cweagans 7 років тому +6

    Also consider checking out Universal Ctags, which is a more actively maintained fork of Exuberant Ctags. Includes lots of patches, including vastly improved PHP handling if that's your thing.

    • @maxmeranda
      @maxmeranda 7 років тому

      Thanks!

    • @ashwin.n
      @ashwin.n 6 років тому

      Support for modern C++ was a painpoint in classic Ctags. Thanks so much for pointing out this maintained fork of that.

  • @RostislavBagrov
    @RostislavBagrov 5 років тому +3

    Great talk dude! Most people don't realize how hard is actually doing live presentation.

  • @ThugLifeModafocah
    @ThugLifeModafocah 2 роки тому +1

    This is a really cool talk. Vim is not just awesome, it is more than that, by far.

  • @this-one
    @this-one 3 роки тому +2

    56:54 :cwin opens a little window at the bottom with all the quickfix errors. It's already included with no plugins needed, which is pretty neat.

  • @ultradude5410
    @ultradude5410 3 роки тому +1

    Remand are a dangerous rabbit hole. You can make a mapping for darn near anything.
    I for example have an abominable 150+ character mapping that does loads of copying and pasting, opens a new tab, creates 2 files, and even calls a shell script.
    It’s an abomination, but it works, and vim just… lets you do that utterly absurd stupid stuff, and I love it.

  • @BonBonShrimp
    @BonBonShrimp 3 роки тому +1

    Awesome, awesome talk. One of the best talks on vim that I have watched on youtube, for many reasons. Firstly, it encourages users to use the power of vim in its native state without plugins (it appeals to the purist in me). Secondly, in the process, it teaches many useful lessons about the editor. Thirdly, the presenter is great and very engaging.

  • @jasongomez5344
    @jasongomez5344 4 роки тому +1

    45:58 is from teletypewriters (TTY), not typewriters, which was what you got the mainframe output from, before monitor screens came about.

  • @287MdSahil
    @287MdSahil 4 роки тому +1

    This is the best vim talk ever

  • @jonathancuellar5107
    @jonathancuellar5107 8 років тому +11

    for the next videos, please show us the key press....
    Thank you...
    Very nice

  • @phant0mlink
    @phant0mlink 7 років тому +5

    Amazing... I tried to install some fuzzyfinder plugins, but this "native solution" already attends my needs.

    • @AcousticBruce
      @AcousticBruce 7 років тому +5

      Me to. I no longer find a need for a extra plugin.

  • @vasklie3020
    @vasklie3020 Рік тому +2

    Thank you so much for this video! Absolutely amazing explanation throughout! You just helped me create my first .vimrc file with everything I need to get started.

  • @Guilherme-qk9so
    @Guilherme-qk9so 5 років тому +23

    "I'm not saying you should not use plugins", but you won't want to after watching this video

  • @choutos404
    @choutos404 4 роки тому +2

    Regarding ctags: For those using a German keyboard, in Linux you can use Ctrl+Alt Gr+9.

  • @albert3407
    @albert3407 Рік тому +1

    1:03:00 the best use of help system, jump through you don't have to read every single section

  • @MistaSmith
    @MistaSmith 8 років тому +1

    more videos like this please. most of the stuff in vim takes long to learn, but all you learn can also be applied to other stuff (e.g. you learn to read help to configure your autocomplete, then you can also search other stuff in :help).

  • @marcosmota1094
    @marcosmota1094 4 роки тому +2

    Thank you. I'm a junior sysadmin catching up after a long hiatus. Great talk and super useful for the future. Shared it with friends.

  • @churchilldu8261
    @churchilldu8261 16 днів тому +1

    Love the class atmosphere

  • @zacharymrowicki4595
    @zacharymrowicki4595 7 років тому +4

    Fantastic video! The snippet completion thing with nnoremap is my new favorite feature.

  • @BillSteinhauser
    @BillSteinhauser Рік тому +1

    1:07:47 ans: "ex" mode refers to vi/vim ":" colon command line at bottom of screen... and another 50+ editing options available there.
    Main features of "ex" mode have been in "vi" since 1970s, even before vim.
    Especially usefull to do quick multi-edits, that can make changes to many lines at same time.
    For instance:
    You want to change variable/string SomeOldName to DaNewName everywhere in a code file...
    :%s/SomeOldName/DaNewName/g
    (that's it, 30:sec edit may do 400+ changes)
    Ex":" mode can do 100's of things like:
    :r filnam (reads another file into this one)
    :60,202d (del lines 60 to 202)
    :44,$w saver.txt (writes line 44-end to file)
    :.,+100s/^/# / (comments next 100 lines of shell script)
    Many people are using bits of "ex" mode without realizing it... and Max (speaker) knows that. Even though the words of his reply say "I forget what that is for" if you look at the screen behind him, he Does go into "ex" mode, and may know some of its abilities -but may not realize there is another full featured command line editor under there, to give you extra "super powers" for bulk changes similar to "sed".
    ( ex mode editing could be a separate presentation by itself )

  • @thingsiplay
    @thingsiplay 3 роки тому +1

    This guy is a blast to watch and listen. Really good.

  • @albert3407
    @albert3407 Рік тому +1

    how to navigate netrw-browse maps treelisting: t new tab, v vertical split file, with d you can create a directory, with D you can delete files or directories, gh to show or unhide hidden files.

  • @arvindn
    @arvindn 4 роки тому +4

    The way to ignore some files/folders for example node_modules would be as follows : set wildignore+=**/node_modules/**
    To exit out of the autocomplte and remove anything typed, hit ctrl+E

  • @GooogleGoglee
    @GooogleGoglee 4 роки тому +1

    By the way you have a microphone talk into it!
    You have a cursor on the screen you can use to point out what are you referring to with your speech

    • @Spielix
      @Spielix 4 роки тому +1

      Vim users don't touch their mouse xD I had no problem with his mic tho.

  • @AcousticBruce
    @AcousticBruce 7 років тому +22

    Question about canceling auto-complete 31:37 (I think that was the question): ctrl-E

    • @kirschkern8260
      @kirschkern8260 4 роки тому

      What Microphone was used here? (Standing byside the Laptop)
      Brandname,model, or Type of Microphone) would be very helpfull if somebody can tell :)

    • @TylerisYoung
      @TylerisYoung 4 роки тому

      @@kirschkern8260 Been a while, but this looks like the "Zoom h4n pro " There is a newer "zoom h4n pro +" which is slightly better because of the preamps imo. I've owned both in addition to the cheaper but slightly less capable "zoom H1" all are prefect for doing something like this, and currently I only own an H1. Check out some other videos depending on your needs. Best of luck!

  • @michaelvasquez5768
    @michaelvasquez5768 4 роки тому +2

    Awesome! Finally can get rid of Webstorm which I had been using as a fancy heavy text editor anyways.

  • @chromosundrift
    @chromosundrift 4 роки тому +1

    ex mode is good for editing a sequence of normal mode commands as if they were a buffer, particularly good for editing ad hoc macros

  • @quirkasaurussaurus2896
    @quirkasaurussaurus2896 4 роки тому +2

    19:21 "get current file-name". the line-command :f does that for you. or CONTROL-G . the % sign is a vim meta-character that defaults to the file-name to allow you to pass it into line-commands. interestingly, :% is the equivalent of :1,$ and allows you to do things like: :%!sort to sort a file in place. or: :%g/DELETE-ME/d to delete specific lines through-out the file. So . . . you could do this and use % twice with different meanings in the same line command: :%!sort % to sort your file in place.

  • @AsAs-tq9ek
    @AsAs-tq9ek 4 роки тому +32

    I've just watched this video and removed all the vim plugins immediately

    • @howuseehim
      @howuseehim 22 дні тому

      You guys still using vim ?

    • @MrZombastic
      @MrZombastic 21 день тому

      @@howuseehimofc, why shouldnt we?

  • @ccameron
    @ccameron 4 роки тому +14

    Fun fact: ^e escapes autocomplete, reverting changes

  • @holalluis
    @holalluis 7 років тому +2

    great video! I've been using vim for several years, and I always like to watch videos like these and learn new things! BTW, for the system clipboard issue, you can do it with "set clipboard=unnamed"

  • @kisekinomahou
    @kisekinomahou 8 років тому +1

    Though it's not any better, couldn't you just do "f

  • @sultral
    @sultral 6 років тому +4

    Excellent presentation! I learnt a lot from it. Thank you Max! Perfect speed and great humor along the way!

  • @aidanbrumsickle
    @aidanbrumsickle Рік тому +1

    you can exit completion mode and go back to what you had typed with Control-E.

  • @zlovredniyTip
    @zlovredniyTip 6 років тому +1

    Thanks a lot for this talk. Cannot emphasize how much this talk has helped.

  • @Phantom-pj1ls
    @Phantom-pj1ls 4 роки тому +6

    Does this guy have other vim talks? He's just awesome!!!

  • @csbnikhil
    @csbnikhil 5 років тому +6

    This talk is absolutely beautiful!

  • @pavel_espinal
    @pavel_espinal 2 роки тому +1

    This was a very insightful video. I learned new things, and refreshed others.

  • @JesseSteinfort
    @JesseSteinfort 5 років тому

    That was great. I have been using vim way too casually all my life. Thank you.

  • @obrien8228
    @obrien8228 Рік тому +2

    @ 13:44 question about ignoring The following will ignore compiled files edit fyi
    set wildignore=*.o,*~,*.pyc
    if has("win16") || has("win32")
    set wildignore+=.git\*,.hg\*,.svn\*
    else
    set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
    endif

  • @priteshugrankar6815
    @priteshugrankar6815 8 років тому +12

    I'm watching this while compiling YouCompleteMe for gVim on WIndows in the background. :)

  • @FStopFever
    @FStopFever 8 років тому +1

    Glad I watched this in the learning phase of VIM.

  • @okdoomer620
    @okdoomer620 3 роки тому +1

    The clipboard thing is specific to the OS, i guess that's the lame excuse why it's so hard. I use linux, and X (not wayland) like most linux users, but there is probably a drop-in replacement for other compositors. One relatively straight forward way to make it work on X is to install xclip, it's small and easy to use, available on every distro and it allows you to paste into and copy from your terminal (or scripts etc. it's great). you can pipe into it and so on, and I ended up just hooking that one up to a command, now it works for me, but can only copy by using visual mode, which might not fit your needs.

  • @crownstupid
    @crownstupid 4 роки тому +19

    CTRL+g is shortcut to show what file you're in.

  • @davidbasil3161
    @davidbasil3161 Рік тому +1

    'find' with a path set up like that is super slow with medium to large codebases. You have set specific folder names where you want to search files for.

  • @alkolaqi83
    @alkolaqi83 8 років тому +45

    What an awesome talk. One of my fav! good job

    • @changemewtf
      @changemewtf 8 років тому +1

      Thanks very much!

    • @kirschkern8260
      @kirschkern8260 4 роки тому

      What Microphone was used here? (Standing byside the Laptop)
      Brandname,model, or Type of Microphone) would be very helpfull if somebody can tell :)

  • @venkateshhariharan4341
    @venkateshhariharan4341 3 роки тому

    Answer for the questions in file searching @13:21 and @15:47, how to exclude certain file types with have set path+=**?, And how to reduce slowdown of **?
    I don't have right answer to the first question, but we can solve a tideous problem when we work on python environments (we have lot of files in bin,...) Our main files will be present in project directory or one or two directories deep, by default vim will search for file 30 directories deep when using ** is set to path, we can change how deep vim can go by **n , n will be integer,
    eg: "set path+=**2"
    will make vim to search only two(2) folders deep, this will not include env files in python. We can save performance, reduce slow down of going 30 directories deep and tabbing. Happy coding and happing vimming🙏🙏🙏

  • @faustoorieta
    @faustoorieta 6 місяців тому +2

    long hair, glasses, weird beard..i can already tell this guy knows what he's talking about

  • @owenwexler7214
    @owenwexler7214 2 роки тому +3

    5:36
    I believe the predecessor to Vim's name was actually pronounced "vee-eye" if I'm not mistaken.

    • @owenwexler7214
      @owenwexler7214 2 роки тому

      Also if I'm not mistaken Vim is.a recursive acronym that stands for "vi improved"

  • @PhilipDudley3
    @PhilipDudley3 5 років тому

    I would augment this video with reading the Learn Vimscript the Hard Way document or website. Very, very informative.

  • @TiananmenSquareMassacre1989
    @TiananmenSquareMassacre1989 7 років тому +4

    Off topic to be sure, but... nice Dave Strider sticker there.

  • @NavdeepGaur
    @NavdeepGaur Рік тому +1

    it's a complete operating system!

  • @adriansrfr
    @adriansrfr 2 роки тому +1

    :Helpgrep at 1:04:00 was amazing, thanks!

  • @jiakai7254
    @jiakai7254 Рік тому +1

    Does fuzzy search do deletes the same way? cos that imprecision can be risky at times, maybe that’s why it’s not default way

  • @nevoyu
    @nevoyu 4 роки тому +1

    I've only recently ventured into Vim.
    I have much to learn