Ben Orenstein - Write code faster: expert-level vim (Railsberry 2012)

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 107

  • @ppg5
    @ppg5 9 лет назад +109

    Why didn't you record the screen so we can follow along?

    • @pablopunk
      @pablopunk 7 лет назад +5

      Because he is lazy, didn't you hear that?

  • @leonk6950
    @leonk6950 5 лет назад +12

    Tip for all of you: use autohotkey or something similar to map TAB+[hjkl] to your arrows. This way you can use hjkl everywhere. Also map tab+X to delete ( vim like ) and what I did is tab+n to backspace. The long-reaching pinky movement is deadly to your fingers.

    • @user-je8he7ox6p
      @user-je8he7ox6p Год назад

      In a non-Vim environment, I am forced to use the arrow keys. Your advice helped me solve this problem. Thanks a lot!

  • @WayneWerner
    @WayneWerner 9 лет назад +6

    There's a guy who asks a question about running tests async in Vim.
    If you have Tmux available you can use tmux send-keys to send the run commands to a tmux pane which *does* run it async. It's pretty fantastic.

  • @qiuxiaomu6746
    @qiuxiaomu6746 8 лет назад +14

    This is really expert level... like not just vim, expert level eyesight and all other stuff...

  • @Fachher
    @Fachher 9 лет назад +112

    Worst camera guy I've every seen. Showing the guy not the screen.

    • @Yegorvs
      @Yegorvs 6 лет назад

      Oh, man…I just got crazy because of it.

    • @peterfarr9591
      @peterfarr9591 6 лет назад

      Not camera man - definitely the director - but yes

  • @AndyThomasStaff
    @AndyThomasStaff 10 лет назад +13

    Mappings in your vimrc? Change inside word? Macros? This is a beginner level vim talk. It's also bad practice in vim not to use relativenumber

  • @MistaSmith
    @MistaSmith 10 лет назад +9

    The thing about hjkl is that you often don't use them anymore once you get intermediate. But I don't think you can get there if you never started using hjkl at first.

    • @qiuxiaomu6746
      @qiuxiaomu6746 3 года назад +1

      you still do to some extent, when you go 100h where it’s actually 101h you got to make that micro h move; even if you jump straight to your point in mind you might do some mini adjustment; hjkl is not basic that’s essential IMO.

  • @reformed_attempt_1
    @reformed_attempt_1 3 года назад +2

    You can actually remap Caps Lock to run as Esc when pressed by itself and as Ctrl when pressed with another button. At least on Ubuntu it's easy

  • @patrickdoyle4581
    @patrickdoyle4581 6 лет назад +4

    So, expert-level vim means customizing your vimrc to reduce keystrokes? That's disappointing. I'd rather see a talk on how a vim expert can fly with vim out of the box. Like that tip on dumping a macro into a file and editing it -- more of that!

  • @michaelmitchell2991
    @michaelmitchell2991 10 лет назад +8

    jumped to the comments because I thought presentation (and camera work) overall sucked and other comments same

  • @MrPuppyDrool
    @MrPuppyDrool 11 лет назад +4

    Why aren't you focusing on the projection? :(

  • @IgnacioChavez
    @IgnacioChavez 10 лет назад +8

    whats up with the camera man, 19:00 I want to see the screen not the guy

  • @aidanbrumsickle
    @aidanbrumsickle 11 лет назад +3

    I like to use Control-[ instead of the Escape key. It's less strain on my left pinky.

  • @wojtasskorcz
    @wojtasskorcz 11 лет назад

    As long as they're right-handed, I think most people operate the mouse with their right hand and the WASD (or HJKL as you suggest) keys with their left hand. But if you're left handed, it may work (with the mouse on the left side of your keyboard).

  • @ianpan0102
    @ianpan0102 6 лет назад +1

    When he did holding J and holding K how is it so smooth?

  • @hangugeohaksaeng
    @hangugeohaksaeng 8 лет назад

    Vimrc to remote machine with high security: use xdotool (on linux) to "type" vimrc into ssh vim session. This is very quick and can be scripted and executed with a hotkey from you desktop environment/window manager.

  • @midevil656
    @midevil656 11 лет назад

    Love this. Had no idea what leaders were before this, and also got a few good plugins out of this too.

  • @pedalhardPDX
    @pedalhardPDX 10 лет назад +1

    Ben is a good presenter. That said a video about commands should show the commands not the presenter -1 for the videographer. VIM is the best! ~mc

  • @MrRosamunda
    @MrRosamunda 5 лет назад +1

    there are some hidden gems in this talk

  • @gjermundification
    @gjermundification 7 лет назад

    12:05 this is the difference between using vim as a text editor, I have repeated this a gazillion times before, vim is a text synthesizer and the arrow keys only work in insert mode. The insert mode is when vim behaves like a text editor, text editors are highly inefficient when it comes to producing text, text editors are the brute force of text production. Normal mode in vim is where you synthesize text; that's where you have the potential of being efficient. If you are to use HJKL play tetris using these keys. Then again there are better ways to navigate text /, *, %, and so on.

  • @nXqd
    @nXqd 11 лет назад

    hmm, is that a go pro camera on the table ?

  • @dejotable
    @dejotable 7 лет назад

    quit watching after 10 min and not learning a single new thing. i already knew how to open help :-)

  • @holalluis
    @holalluis 11 лет назад

    I think that the best way to navigate through files is the command :e. That opens the current folder and lets you navigate files without needing plugins

  • @SamuelGoodwin
    @SamuelGoodwin 11 лет назад

    For the record, you can rebind all of Terminal's keyboard shortcuts. You can do this to any app.

  • @lostingamma
    @lostingamma 11 лет назад +3

    I can't see the screen!

  • @branquitodemunze
    @branquitodemunze 8 лет назад +14

    Expert level? Come on dude, those are basics..

  • @wojtasskorcz
    @wojtasskorcz 11 лет назад

    No use, because in FPS you press the keys with your left hand, and in vim you use those keys with your right hand.

  • @hydrox24
    @hydrox24 12 лет назад

    Excellent video, listened to the whole thing and there are some great tips in there.

  • @gargshishir3
    @gargshishir3 9 лет назад +16

    guy asking question at 32:20 sounds like Stephen Hawking

    • @muffat19
      @muffat19 6 лет назад

      what the fuckkk!!!

    • @Ateshtesh
      @Ateshtesh 6 лет назад

      hahahah its true! xDDD

  • @fernando73820208
    @fernando73820208 7 лет назад

    hey hi, I'm new to vim, and I try to copy html code into a file using vim. when i do this the tag align in more far out, the first and second row start in the first column the 3rd jumps to column 9, the 4th row starts at column 19 and so on. how can I align all the columns to start at columns 1 without doing it one by one. I only know how to do it one by one, but I waste a lot of time doing this.

    • @nicolafontana7765
      @nicolafontana7765 6 лет назад

      `:set paste` before pasting.

    • @NostraDavid2
      @NostraDavid2 2 года назад

      Other than ":set paste", there's some weird shit with older versions of Windows' conhost.exe (basically anything older than Windows 11). You can replace it with an OpenConsole.exe for Terminal, as that is just a newer version of conhost, to get it improved.

  • @FelipeMendez
    @FelipeMendez 11 лет назад

    e tells the commands but i cant see what they do whay isnt recorded the screen?

  • @MattSeymour
    @MattSeymour 12 лет назад

    The discount code is RailsberryVIM2012 but shhh don't share it with everyone

  • @just_nicolas_13
    @just_nicolas_13 3 года назад

    Do we all agree that this isn't expert-level at all ?

  • @BonBonShrimp
    @BonBonShrimp 3 года назад

    Not disclosing vimrc? Lol

  • @humanfactorsio
    @humanfactorsio 6 лет назад

    Health argument seems pretty unsubstantiated - all he's arguing for is CUA in emacs - default install since GnuEmacs versions 22.1.1.

  • @wojtasskorcz
    @wojtasskorcz 11 лет назад

    Perhaps, but there's a problem if you ssh to many different terminals, because you'd have to map your own key settings in each of them. But you're right, jkl; seems more sane to me, too.

  • @monugupta32
    @monugupta32 8 лет назад +4

    Looks like we have a russian army of vim here.. hehe

  • @boliussa
    @boliussa 11 лет назад

    amazing talk.. filming needs to be improved. the guy with the camera needs to be nearer the screen so he can zoom in.

  • @zzasdfwas
    @zzasdfwas 11 лет назад

    running vim over a slow terminal taught me not to hold down directions

  • @moofymoo
    @moofymoo 10 лет назад +20

    "I'm expert, i'm saving with ctrl+s.." like the rest of the world, lol.
    I love viming around, but this expert guy has tooo BIG ego.

    • @ExD3aD
      @ExD3aD 7 лет назад +2

      whats wrong with ctrl+s ? show me a better shortcut to save files...

    • @dreftymac9916
      @dreftymac9916 7 лет назад +4

      Nothing wrong with ctrl+s ... but the point is this does little to distinguish vim as a powerful editor versus, say "notepad.exe"

    • @pspicer777
      @pspicer777 5 лет назад +1

      ExD3aD Nothing really wrong, but I prefer to have two key commands be executed on different hands, one key per hand in regular typing position. So map ”,” as in .vimrc, then use w for fast writes (save). Use nnoremap and inoremap with i for normal and insert modes. Very fast ....

    • @reformed_attempt_1
      @reformed_attempt_1 3 года назад

      what are you talking about. Most vim users I know use :w to save, not ctrl+s
      actually, it's the first time I hear someone mentioned ctrl+s

  • @metal571
    @metal571 11 лет назад

    pretty great stuff

  • @marekstepanek3224
    @marekstepanek3224 5 лет назад

    unfortunately impossible to follow. Screen out of focus.

  • @danielnowak1658
    @danielnowak1658 6 лет назад

    you have to put speed on 75% then the guy talks normal

  • @nixthenamed
    @nixthenamed 11 лет назад

    Command T is faster, because vimscript is slow.

  • @zeuseditor
    @zeuseditor 11 лет назад

    Brief save file has always been Alt+W so I guess by using the correct editor from the start I've save several million keystrokes onver the years.

  • @mgrycz
    @mgrycz 12 лет назад

    Great stuff.

  • @Duffman0
    @Duffman0 11 лет назад

    How the hell do you aim?

  • @Kirtaainen
    @Kirtaainen 11 лет назад

    tut starts at 6:20

  • @nXqd
    @nXqd 11 лет назад

    28:20 if you are looking for a script to run the test async, check the plugin Dispatch from Timpope github.com/tpope/vim-dispatch

  • @Thanaz483
    @Thanaz483 11 лет назад

    We can now run tests asynchronously too! Check out github.com/tpope/vim-dispatch.

  • @AleksyGrabovski
    @AleksyGrabovski 7 лет назад

    this guy is taking editing speed too far I think

  • @421sap
    @421sap 7 месяцев назад

    God bless you, Ben Orenstein in Jesus' Name Amen ✝️

  • @ttssbb99
    @ttssbb99 12 лет назад

    ctrlp.vim is like command t but way better. Written in pure vimscript so it actually works.

  • @DarrylHebbes
    @DarrylHebbes 6 лет назад

    Let's see what is being typed on screen by watching a guy in a shirt....

  • @SamuelBarney
    @SamuelBarney 6 лет назад

    The Work > Tools(vim) ...minimalist ftw

  • @CgruppoGau
    @CgruppoGau 7 лет назад

    Funny how people can do that?

  • @christofferklang
    @christofferklang 12 лет назад

    I promise not to share the coupon code ;)

  • @sativaindica4841
    @sativaindica4841 11 лет назад

    na i map ,, to save and jj to mimic the esc key

  • @OmriHarShemesh
    @OmriHarShemesh 11 лет назад +4

    One of the most useful vim mappings I like to use is to map semi-colon to colon. Saves millions of shift presses :-) code: nnoremap ; :

    • @ChrisCox-wv7oo
      @ChrisCox-wv7oo Год назад +1

      This overwrites the default "Repeat last f, F, t, T" behavior of the semicolon. Just fyi to anyone following this.

  • @darthvalar4377
    @darthvalar4377 5 лет назад

    Yeah ... this time I was sorry I am not allowed to give like 1000 dislikes ... the camera work ruined it all

  • @shawn576
    @shawn576 10 лет назад +1

    This guy should buy a computer made in the last 20 years. He'll be amazed how much easier computing is when you have a mouse.

    • @user-km7yr8wl6q
      @user-km7yr8wl6q 9 лет назад +3

      Actually, I used to use a mouse. So very inefficient. Ever since I switched to Vim a few days ago, I almost doubled my productivity.

  • @onetwothree123-
    @onetwothree123- 3 года назад

    Nice joke camera guy

  • @krishnaagarwal6339
    @krishnaagarwal6339 5 лет назад +1

    The video is good but the video maker have no sense of making videos.

  • @JackVo
    @JackVo 11 лет назад

    I am a master of vim.

  • @mradnanchowdhury
    @mradnanchowdhury 11 лет назад

    vim-4-life
    down with emacs

  • @hobolooter
    @hobolooter 10 лет назад

    I'm sorry, but this talk just wasn't all that good. Neither the content or the presentation style fit what I would have expected from an expert level VIM talk.

  • @MeditationProfondeS
    @MeditationProfondeS 11 лет назад +1

    Vim is awesome, ruby is bad. Ruby is emacs and python is vim.

    • @juniorbrito7495
      @juniorbrito7495 10 лет назад +1

      so ruby is good with emacs?

    • @kiva8986
      @kiva8986 6 лет назад

      >ruby is better than python

  • @SatansSpatula
    @SatansSpatula 12 лет назад

    Stop abusing "anti-pattern".
    Also, lose the sippy cup. It's distracting as hell hearing you slurping and smacking on that thing.

  • @picklerick3136
    @picklerick3136 4 года назад +1

    cannt see a shit

  • @MitchGalgz
    @MitchGalgz 11 лет назад

    Emacs

  • @neuemage
    @neuemage 11 лет назад +1

    SUPER UBER MEGA LAME start

  • @MrDsmover
    @MrDsmover 11 лет назад +1

    not useful! I've been using this great editor only for a month. But I already can say that I'm aware of all these points said by him. So it's water shit.

  • @RyeinGoddard
    @RyeinGoddard 11 лет назад

    This is one gay looking conference.

  • @MuffinMan0521
    @MuffinMan0521 2 года назад

    It's weird to me why anyone would go down the rabbit hole of learning Ruby or Python. .NET for instance has a much larger ecosystem that makes it much more natural to pivot from web to desktop or to service API's. Visual studio or VSCode is far superior to any of the l337 hax0r glorified notepad "IDE's" you guys use.

    • @NostraDavid2
      @NostraDavid2 2 года назад

      Python is king in data science. Why? The Pandas lib. Data scientists and analysts are no full software engineers. They just want to use an easy-to-use language, which Python perfectly fits.
      I use it professionally, and the language and it's libraries are pretty great, but good god is it slooooow.
      Also, vscode is also a glorified text editor, so not sure why you're using it as a supposedly superior IDE when it's not.
      Don't get me wrong, I love me some vscode, but there's nothing integrated about it. Also, it's slow as dogshit on my work laptop, which is why I'm switching to Neovim. It should not take 150ms to take a single debug step. That's just too much.
      Anyway, nothing wrong with using C# and/or vscode, as long as it fits your use case :)

  • @branquitodemunze
    @branquitodemunze 8 лет назад +2

    Expert level? Come on dude, those are basics..