Why Vim Doesn't Need the Mouse

Поділитися
Вставка
  • Опубліковано 16 гру 2024

КОМЕНТАРІ • 203

  • @JM-jc1vz
    @JM-jc1vz 6 років тому +519

    I'm a simple man: I see vim, I click like, then agonize over having left the home row.

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

      J M stealing this

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

      True vimers don't leave the home row. Even in browsers.

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

      Use Qutebrowser! Or a plug-in for Chrome/Firefox/etc. like Vimium!

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

      Try out Vimium extensions!!

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

      Oww pretty good.

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

    True Hell is when Vim is used through a touchscreen.

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

    1:07
    Joke's on you, Luke, I use a trackpoint.

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

    I realized that the mouse was not ergonomic when I was a kid because I used to play a lot of Age of Empires. Using keyboard short-cuts to select units and do stuff was way faster than using the mouse, which is great when you're playing a real time strategy game.

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

    Man!!! I really missed your Vim videos. You should make a series, from noob to guru.

  • @dcngn_
    @dcngn_ 2 роки тому +7

    I've learned all the basics to move around the document, but always had the urge to use the mouse, because many tasks were still annoyingly slow. This video shows the exact commands I needed to love vim!! Cutting and pasting, changing, then modifying those with "in [" or "all paragraph", using / and f to navigate (I don't really use f often, but I think there are plugins that do the same with 2 characters, which should be efficient most of the time). I just wish there was an automatic comment/uncomment script instead of C-v -> iterate lines -> I -> # or // for comment and d for uncomment -> TAB. Like most editors use ctrl + / for comment/uncomment

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

    Beginner tip:
    Just learn the most basic commands first and get used to them:
    exit
    save
    insert (i or a)
    movement keys
    delete (dw and dd)
    and ignore everything else. Once you got kinda used to it, learn one new command at a time and use it if needed. This way you won't forget your commands
    For example the paste command or whatever you think is inefficient the way you're doing
    Everything else is just for efficiency. But you are already at a point where you can do everything you do with any other editor

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

      :q exit
      :q! force exit if file not saved
      :wq write and exit

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

      Love how you put exit as a first command to learn

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

      q!
      Set EDITOR=nano
      rm usr/bin/vi
      ln /usr/bin/nano /usr/bin/vi
      Ttys are a bit faster than 300 baud now a days. There’s no need for this arcane insanity.

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

      Mostlyharmless1985 who needs vi if there‘s nvim, right?

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

      @@froge8121 out of the box, nvim is seriously laggy for me, not just starting up, but even just moving around the text.

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

    Building a text editor using electron is like using an oil tanker as a paperclip.

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

    Wow, watching it a few months later again and just realized I forgot almost everything... I have to save this for watching over and over again!
    If I could give this video another thumbs up, I would!

  • @KayOScode
    @KayOScode 5 років тому +18

    Before I started using vim, I wasn't even bothered by the mouse problem. Then I started using it a few years back and rarely don't use it for programming.

  • @jose-pe
    @jose-pe 3 роки тому +1

    0:57 "You have your keys in your keyboard"
    Extremely acurrate.

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

    I sure do wonder why an editor that predates the mouse doesn't need the mouse.

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

    With the vim-sneak plugin you can use f F t and T vertically :)

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

    Editing at the speed of thought.
    I heard this sentence in some vim presentation and remember it very clearly and this characterizes vim very well (at least for me).

  • @AD34534
    @AD34534 5 років тому +47

    I've been stuck in vim main menu for 15 years. Send help.

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

    6:40 Oh my god, you use *puke* as a mnemonic for p, that's amazing.

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

      Hiandbye95 I didn't realize that till you pointed it out lmao, I assumed that was standard with how confidently he said it

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

      It's not really a vim mnemonic; just a computer metaphor. You'll notice in my other videos I actually use "puke" to mean standard output too.

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

    Hey Luke, love your videos! Just wanted to mention that the document you opoened.about neural nets looked really interesting.

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

    Or when you try to highlight the word only but the computer grabs the space, or worse, new line character too by default unless you dance the cursor around at the end of the word just right.
    I’m looking at you ALL Microsoft products.

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

    Hello from Kazakhstan. Love your videos Luke.

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

    First timers:
    -"how do I exit this thing?"? Ctrl-C Ctrl-X EXIT [ENTER] Ctrl-Q ..... smashes keyboard... Ctrl-C again... Esc Esc Esc Esc Ctrl-C.
    -"Ok. Ill close the window, then reboot and then I'll uninstall this virus"

  • @kj-marslander
    @kj-marslander 4 роки тому +7

    "Oh geez I really wish I could use my mouse here..." said no vim user ever.

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

    8:14
    You don't even have to do that. You can do -> :(line number).
    Ex. :23 || :10
    etc

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

    I switched from Emacs 7 days ago. I need to talk about this with someone

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

      Spacemacs seems to combine the best of both worlds. Have you tried it?

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

      First I tried emacs, loved it for a while, then my hands started hurting from the default commands. Then I tried Spacemacs, it asked me to choose between vim or emacs mode... I said vim to try it. I got the hang of it... and eventually got tired of big slow text editors that took longer to start than it took for me to edit the file I needed to, so I've been using vim strictly since. Never thought I'd be a vim user... but after trying out the competition I just don't see any benefits of switching to anything else right now. I've heard there are problems with vim when it comes to handling large programming projects(?), if I encounter any setbacks like that I might switch to Spacemacs or something.

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

    Very helpful tips! I have been using Vim for a while now, and just love its design :D
    Thanks for the effort.

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

    How to read out vap and similar would be something like: visual *around* paragraph

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

    SUPER helpful video for understanding Vim! Thank you!

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

    Do you have a terminal tool for PDF?

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

      Vim and LaTeX are your friends

  • @TEXASF1ERCE
    @TEXASF1ERCE 5 років тому +1

    But how do I copy what I selected into my clipboard to paste in another application?

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

    I just wish vim used JKL; for navigation instead of HJKL so it actually stayed on home row.
    I know why it was designed that way and I know I can reconfigure it, but that doesn't help me if I'm tasked with editing conf files on a server I don't own and I'm stuck without my vimrc.

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

      That's so true, and I'm quite surprised they never changed it even thought it would be a huge change

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

      hi, I'm late, but I actually use jk a lot more than h; so having 2 strong fingers (index and middle) on jk makes sense to me and a lot of people
      I use w and b to move horizontally instead, and only use h; on a very few occasions

  • @rohanghige
    @rohanghige 5 років тому +1

    Do you know any good solution for opening all files (from vim, not from terminal) whoses names are written in a single file (filename on each line) and this file is opened in a tab.

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

    Does vim have auto complete features like vs code?

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

    I wish someone would make a productive VIM tutorial.
    Like, literally the least amount of VIM necessary to edit documents 'at the speed of thought' for the most common use cases like standard text documents, and code.
    Why VIM tutorials insist on showing you 28 different ways of doing the same thing is beyond me.

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

    Great video! I learned a lot and I think I might give Vim another try!

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

    Two questions: what distro if Linux are you using? And how do you keep your terminal window a fixed size like that? Thanks!

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

      Distro is Arch or Parabola but that doesn't matter much, he's using i3 as his window manager and that why terminal looks like that

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

    I have been using vim for two years now and I just can't live without it anymore. When I am stuck with windows and I have to use an IDE, I always check to see if there is a VIM extension. I am simply way faster with vim keybindings.

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

    are you doing something with sivesutras?

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

    How do you change Terminal font size?

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

    But Stallman told me to use Emacs!

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

      emacs is bloated

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

    Also if you are running Manjaro, install gvim instead of vim package.. The gvim package that provides vim is compiled with clipboard support where vim provided by vim package has none. gvim package installs vim as well but with more features.

    • @sigasigasiga
      @sigasigasiga 6 років тому

      Anthony Dach or you can simply install neovim

    • @Sergeeeek
      @Sergeeeek 6 років тому

      gvim is also incredibly fast since it doesn't go through a terminal emulator.

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

      "+y copy to clipboard

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

    How to get that option to show dollars and asterisks only if the cursor is in that row?

    • @ClaudioRoncaglio
      @ClaudioRoncaglio 6 років тому

      Andrea Palmieri it's a plugin for markdown file. There are many.

    • @andpalmier
      @andpalmier 6 років тому

      Claudio Roncaglio Thanks! I tried many of them, but I wasn't able to find this feature, do you know how it is called the one he is using?

    • @ClaudioRoncaglio
      @ClaudioRoncaglio 6 років тому

      Andrea Palmieri try this: github.com/vim-pandoc/vim-pandoc/blob/master/README.mkd

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

    I'm able to use the mouse to move the cursor. It automatically enables visual select when I'm highlighting with the mouse. I don't need it, but it does work for me. I'm using Termite if that matters.

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

    How about syntax highlighting for coding ( I know a crutch) forpython and others? How do we impliment it?

    • @madusan1
      @madusan1 6 років тому

      I figured as much.. Used to use vi / vim in the 90's. Thanks for the reply. Just wanted to now if there was a pre-made addon for python highlighting I will check out...

  • @tetasaaa8648
    @tetasaaa8648 5 років тому +1

    hello, someone can tell me what desktop environment is he used?

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

      @henry stevens no, it's not too late, thank you for your answer

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

      @henry stevens i'am on centos 8. I have tried some tiling windows like i3 but, it seems doesn't work well

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

      @henry stevens whats alternative for i3 do you suggest me to use?

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

      @henry stevens keyboard key do not work, i also tried the keyboard shortcut but it seem not work

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

    OK, not to sound completely naive but what is up with his line numbers? Is that a plugin?

    • @BLUYES422
      @BLUYES422 5 років тому +1

      its a setting to set the line numbers relative to his current position

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

      that way if i wanna goto a particular line instead of saying goto like 235 or whatever if its 10 lines relative away i can just do 10j instead of g235 or whatever

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

    Hey Luke how do you increase the Terminal font size?

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

      It's a shortcut in st, my terminal emulator: ua-cam.com/video/FJmm7wl4JUI/v-deo.html

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

      st just looks like the chad terminal I've been looking for. Unfortunately I can't get it to run if I don't apply the solarized background patch. Without it I get a stacktrace mumbling about free(): invalid next size (normal): 0x0000557e4d401080. Oh and btw I'm on Debian with Gnome 3.

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

    2:19 unless you :set mouse=a

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

      I use it for scrolling text with the mouse wheel

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

    I can scroll with mouse, I use thinkpad trackpoint so sush up. :D It scrolls pretty fast through file.
    Also VIM has troubles with syntax when the lines are too long! And for latex paper with long complex equations, it's painfully slow :(, learned to live with it but keeping shutting down syntax often

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

    "You have to move the mouse all the way to where your mouse is"
    Why do you think trackpoint exists.

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

    "set mouse=a" for me, because i've got that schweet thinknipple

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

    how do i do 3d modeling with out the mouse xdddddd ?i wish i find a way btw

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

    b-but can he use vim hardmode efficiently?

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

    But The Main question still left unanswered - how do i exit vim!? :)

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

      You hold down your computer's power button for 10 seconds.

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

      There's no need. You are now in text-editing Nirvana. You can spend eternity blissfully browsing and correcting the Library of Babel.

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

    TRuly you are my spirit animal!

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

    1:14 wait what? Left handed people use mouse with left hand??
    (ps: i am left handed)

  • @AdventureTimeWithAsh
    @AdventureTimeWithAsh 5 років тому +1

    vim vim vim and me having no clue what the heck is that

  • @iLiokardo
    @iLiokardo 5 років тому +1

    what would BUP mean in Vim?

  • @tasoulman
    @tasoulman 6 років тому

    At ~ 2:30 you mention that the mouse does not work with vim which is not entirely true. You can enable mouse support on vim with `:set mouse=a`

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

    4:20 We get it, you VAP

  • @Echo-te1sf
    @Echo-te1sf 6 років тому +1

    Could you cover your i3bar or whatever you use instead of it?

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

      That was literally the last video I did.

    • @Echo-te1sf
      @Echo-te1sf 6 років тому

      Luke Smith Oh no. I am so sorry. I was off for a few days.

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

    That's the point of vi.

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

    [ Emacs User Alert! ] The biggest problem with Vim keybindings that I could think of is that it really gets deep in your brain, and you'll not be able to effectively edit text on other software or platform without constantly reminding yourself NOT to use 'hjkl' to navigate or press 'i' and 'ESC' to hop in and out of Insert Mode. While with Emacs bindings all the navigating shortcuts are prefixed with Ctrl or Meta (Alt) and can be ported to different platforms once you get used to it!

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

      i have to sometimes write documents in google docs and you get used to the switch. that said, normal text editing feels like moving through molasses. more platforms should offer basic vim-like controls.

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

    I think you know about easy motion. Why not mention it over here! That's such an awesome plugin to move around

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

    Vim Master Race!

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

    I could like this video before even watching it. But let's watch it first!

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

    i dont do a whole a lots of text editing but this is AWESOME

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

    just what i needed, but felt intimidated by the docs.

  • @ГригорийХовер
    @ГригорийХовер 6 років тому +2

    Official tutorial says to use mouse itself for some reason.

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

    I don’t think using the mouse is a bad thing. But there are times you just don’t have the option to use one, and there vim excels.

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

    Which OS is that?

  • @desktorp
    @desktorp 6 років тому

    Also, aside from the raw ergonomic / workflow issues, I have found almost 100% of mice are uncomfortable and cause severe cramping if used for an extended period of time. I have huge hands and I have yet to find a mouse that actually fits my hand.

    • @vN2w3Z59BM
      @vN2w3Z59BM 6 років тому

      david esktorp use an old mouse

    • @Rukakuka
      @Rukakuka 6 років тому

      Steelseries

    • @desktorp
      @desktorp 6 років тому

      >Steelseries
      yeah probably a good size, but way too expensive. *I should've also indicated that I am a cheapskate.* lol
      I suppose I should just bite the bullet and immediately plan on replacing the switches, since I know they use pussy Omron-brand junk switches in their mice.
      I also have a old Logitech mx400 that I should repair. It was the closest thing to comfortable I've ever had. (same basic deal; junky switches went bad real fast and I never got around to replacing them)
      I also have a 20 year old Microsoft Intellimouse that still works great, but the placement of buttons 4 & 5 are a deal breaker.
      I would be fine with the performance of a typical $5-10 optical mouse, if only the mouse itself was larger and/or had a better shape.

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

    What is this doc about Sanskrit grammer, looks interesting.
    Nice video BTW.

  • @philippef.4590
    @philippef.4590 Рік тому

    Thank you

  • @ralenkwisted621
    @ralenkwisted621 6 років тому

    Great Videos. Great Direction. Subscribed.

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

    Visual block is the only useful visual mode
    Change my mind

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

    Hi what Linux do you use?

  • @jauleris
    @jauleris 5 років тому +1

    Is it just me or there is too much transparency? to the level where it is hard to read the text...

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

    Fahrenheit? *UNSUSCRIBED*

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

    Are the keyboard controls the same as Windows? I'm asking because if you know Windows keyboard controls would you know Vim's? Thank you.

    • @xGOKOPx
      @xGOKOPx 5 років тому +1

      Vi (on which vim is based) is older than Windows

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

    vim is only for /g/entoomen with the thickest neckbeards

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

    This video taught me in 10 minutes everything I never got from watching hours of other tutorials! Thank you.

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

    Please make a Video about Kakoune.

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

    ALL THE WAY
    ALL THE WAY
    man... just do it fast

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

    I'll have to try that ctrl-v stuff :)

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

    Vim might not need mouse, but your terminal and browser do

    • @user-he4ef9br7z
      @user-he4ef9br7z 3 роки тому

      No.
      I don't see how a terminal would ever need a mouse.
      Plenty of keyboard based browsers exist. I use the Vieb browser.

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

      @@user-he4ef9br7z mouse is needed for copying. regarding vim browsers or extensions, link hinting is slow and uncomfortable

    • @user-he4ef9br7z
      @user-he4ef9br7z 3 роки тому

      @@davidbasil3161 Copying using the mouse? Where?
      And who's talking about browser extensions. Vieb is not an extension but a browser in itself.

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

      @@user-he4ef9br7z from terminal to vim, or from browser to terminal, or from git output to whatever... and does your browser support notifications?

    • @user-he4ef9br7z
      @user-he4ef9br7z 3 роки тому +1

      @@davidbasil3161 Well you don't need a mouse to manipulate clipboard. Tmux allows me to copy and paste in terminal, vim has its own copying mechanism.
      I don't really know whether Vieb supports notifications, I keep all notifications on my computer off anyways.

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

    Vim is so different than others,
    But why it is not popular???
    BTW nice videos , Subscribed!!

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

    vim is no text editor, it's a minimal coding language made for editing text file.

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

      "Euh actually in fact"

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

    Shiva Sutras. There need to a space in between two words.

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

    Also see the first two answers here stackoverflow.com/questions/3458689/how-to-move-screen-without-moving-cursor-in-vim

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

    9p.io/wiki/plan9/mouse_vs._keyboard/index.html
    Something to think about, even if I do agree with this video in concept.

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

    Check easymotion vim plugin ^^

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

    Trackpoint.

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

    It just works :wq

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

    Why should I use Vim?

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

    Luke, do you believe God used VIm to create the Universe?

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

    shiva sutras, sir ! 🙏

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

    :set mouse=a

  • @adnanmalik-nq8ff
    @adnanmalik-nq8ff 6 років тому +1

    moues keybo

  • @katorgatrain170
    @katorgatrain170 6 років тому

    Jokes on you Luke, i use a nipple.

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

    :set mouse=a *triggered*

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

    Hari Om Namah Shivay