Added: 5 years ago
From: jeevesbond
Views: 96,959
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (154)

Sign In or Sign Up now to post a comment!
  • vim = true power

  • Only problem is, you're editing f*&king pedantic HTML. I never touch markup itself if it can be avoided--that's what DOM libraries are for.

  • lols, Emacs can top that easy. ^^ Just check your video response. Woot! Lamexorz. *trollface*

  • YES it can(Emacs)

    it's easy!

    you can write your own elisp program to do that

    I don't think it's hard!!!

  • hmmm nice demonstration. check out this usage of vim's snippets (I added interactive behaviour) : playterm.org / r / snippet-plugin-for-vim-powa-13­04449951

  • ha, ha, even kate can do more.

  • Oh yeah... notepad can do that...

  • My Emacs can.

  • How do I install this? I have microsoft 2007 if that helps.

    :D

  • needs music

  • i just remembered someone said notepad ++ vs. VI ....

    buahahahahaha fail.

    VIM for the win.

  • this is cool :) always liked the look of vi but im too in love with emacs to even consider trying it out

  • Don't you love it when someone watches your vid then just has to one-up you with some nerdy comment? BTW, mine is that you could have used a regex instead of recording a macro there. :-P

  • Oh boy, so many tables. Am happy my editor doesn't know how to make site design with tables :)

  • @mytube232 These tables are being used to semantically represent data, dumbass.

  • Comment removed

  • @mytube232 You were saying that your editor 'doesn't know how to make a site design with tables'. But these tables are being used to represent data, so they are being used correctly and semantically. If your editor can't do that, it is missing some important (X)HTML functionality. Tables aren't always bad - like I've just said, these are not being used to format the web page look and feel, but to show data properly. Hope you understand now.

  • @Hassan99999 I understood the first time as well. But there is no need to insult others. And that was sarcasm in case you haven't noticed. It's the programmed who makes sites, not editor. If you don't know why you are doing what you are doing then you are nothing more than a macro who happens to breathe.

  • @mytube232 Oh fuck this. You are just so fucking retarded there is no point arguing with you anymore.

  • @Hassan99999 And you are genius because you like Vim. LOL speaking of retarded!

  • @Hassan99999 first of all, dumbass, don't insult others. You have no right to do so just because someone doesn't like the same editor or same video as you. We all have our rights and freedom to like whatever we want.

  • i like vim too, but yes, visual studio and even ms word can do this. ctrl shift r to record a macro, ctrl shift p to run the macro. ctrl left and ctrl right to move left/right one word at a time.

  • Microsoft VIM ? are you smoking crack? the very essence of VIM (open) would never allow microsoft to poop it up.

  • @aaronpsamuel

    Woosh

  • Notepad++ has macros too ;).

  • Emacs = Eight Megs And Constantly Swapping

    Emacs sucks! Vi forever!

  • Vim rocks.

    I actually remapped 'LCtrl' to 'Caps Lock' and 'Esc' to tilde (~). It's much better this way, especially if you have big keyboard like MS Natural 4000.

  • thanks for the quick reply.  I like how it looks all high tech.

  • how did you make your microsoft word with an all black screen and cool colors? Is that only for Windows 7??? or can i do that on Vista too???

    Thanks for any replies

  • @bob8984 This is actually a new Microsoft product called 'Microsoft® Vim 2010™' shown here is the Professional Ultimate Small Business Enterprise Edition.

  • @jeevesbond lol

  • @jeevesbond ahahahaha

  • @jeevesbond I am going to add this to stumbleupon just for that comment

  • @jeevesbond hahahaha

  • @jeevesbond Nice!

    

  • @bob8984 Can't tell if sarcastic or not.

  • @bob8984  You can change the default screen background and text for every version of Windows for awhile now.

  • @bob8984 I really hope you are not serious...

  • @bob8984 I've never seen anything this stupid

  • @EduEnYT : vi or vim properly configured (not like the crap from Debian or Ubuntu)?

  • Yes, emacs has a counts thing. Probably. If not you can just write a plugin.

  • The secret is the counts. You recorded a macro of which last operation was going a line down, then played it using a count which is the same as the number of lines. Still there are details I wanna know, can you make a better quality version, with commentary :)

    Also, do other editors *cough*emacs*cough* have this Counts feature, for operations e.g. macros?

  • Im a big fan of vim, but I would do something like this with sed or perl regex

  • only one opened file per window??

  • of course you can have several files in one window, splitted horizontally and/or vertically and/or using tabs

  • Yes, it can do that.

  • An alternative to remapping the Escape key is to use the Ctrl-[ combination which is enabled by default in VIM.

  • зачот, тоже так умею )

  • I just use kate,or nano

  • I just got myself a job as an open source software developer, and I realized that I would be made fun of if I didn't use either vim or emacs. I chose vim, but GODDAMN is it hard to learn! I've never seen a more unintuitive program in my life. 'J' for down and 'K' for up, '0' to jump to beginning of line and '$' to jump to the end? Seriously, what the fuck?!

  • It's great, because you don't ever have to (at least I've never had to) take your fingers away from the keys. You're always positioned to do the next input ;)

    It's the fastest editor out there when you have learned it and know how to use it for its full potential.

  • Dude I just use the arrow keys...

    The only command I use are / for search, dd to delete a line p to put it back. So sure, I don't use Vim to its full potential but it still works just fine.

  • hjkl mimics the arrow keys on a qwert.-keyboard.

    You can also append to the end of a line by pressing "A" (remember: "A"-ppend) or "a" for "append here", or "i" for "insert here" or "I" for "insert at the beginning of the line (first non-blanc character)"

    Less "what the fuck" than pressing left-arrow multiple times to get the same result.

  • If you don't know touch, learn that first.

  • An easy way to rember the hjkl movments are:

    'j' looks like a down arrow so j is down, k is next do down so that's the up arrow, l is to the right of the up down arrows so it's the right arrow, and h is to the left of the up down arrows.

    You can also use ^ for the begging of line because in a regex the ^ stands for the begging of line and the $ stands for the end of the line

  • emacs can do this, both with macros and simple lisp scripting.

    but notepad...ugh, just thinking about using notepad for programming. *shudder*

  • vim and emacs have startingly similar featuresets, unless you count EMACS PINKY!

    (which requires an erector set to solve. seriously, look it up.)

  • that's why i use caps lock as a control key. i don't know what i would do without it. now emacs is very comfortable, especially when combined with the dvorak layout.

  • On the same note, you cannot attain real Vim efficiency without remapping Escape to Caps Lock.

  • Wrong, I already inverted caps lock with backspace. But I understand your point and i could remap escape with, maybe, left control key, only in Vim. THX for the idea!

  • I LOVE YOU.

  • Well, you can, by remapping Caps to Control and using C-c. Having the actual Caps Lock in it's original place, however, is a very bad idea.

  • Use CTRL + [ instead of Esc.

  • Not a good shortcut on non-English keyboards on which "]" requires the use of Alt Gr. On mine, I get Ctrl + Alt Gr + 9, which doesn't even respond ...

  • lol, remap Capslock to Esc, and Shift+Capslock to Capslock using Autohotkey

  • CTRL-C is much more convenient

  • @theyerdahl you can, just use Ctrl+[ ;)

  • @theyerdahl I usually remap Esc to jj. Much easier I think

  • Yes, my editor can do this. It's no big deal. But I see a lot of my students nowadays using half-baked light-weight editors like Kate or overblown systems like Eclipse. Special purpose systems are okay, but one still needs a powerful general text editor like vim or emacs. Personally I use emacs. You gotta switch the control and caplocks, but then youur fingers never leave the keyboard. And you have powerful keyboard macros and such. I'm sure you get the same in vim, but I could never adjust.

  • Gedit would like to have a word with you.

    :D

  • Vanilla gedit is a rather sparse editor.

  • @LTS1287 : a word or a Word (from MS)?

  • I'd say I pretty half way there when it comes to editing in VIM.

  • I just checked this video again. I posted like a year ago in this same video something like "I wanna learn how to do that!" :) and indeed I have. Now without vim I just can't program.

    Anybody selling viper here is just a fool. Don't dare to compare viper/vimemu/eclipseplugins/et­c with my baby.

  • Vim is amazing, I love the matching brackets features, it makes programming so easy.

  • Most decent editor can can by using a Regex. VIM still rocks though.

  • Doh, I pressed the audio preview too late.

    For the anal retentive, I meant to say:

    Most decent editors can do this by using a Regex. VIM still rocks.

  • vi(m) rocks!

  • Not in this case, the information was semantically best represented as a table.

    Saying that nothing should be coded as a table is as stupid as trying to code everything in a table.

    Yes, in standard English what I was formatting was a "Price List", but it had multiple columns (and rows), to use a list in this situation would be semantically incorrect.

    It would also need a lot more CSS to format it, and I don't see how using a list in this case would reduce the amount of HTML.

  • @jeevesbond I'm sorry to disapoint you, but I agree with hessiess, table is not the standardz!!

    Also, tables are not web scale, you sure need html5 or jQuery or something

  • @dgoponciano html5? jQuery? in 2006?!

  • @AleksandarToplek Yeah! and you need this: bit.ly / llSW7Y

  • @dgoponciano well... you'r right there ;D

  • @hessiess

    You NOT use tables to format your web page.

    Tables are for data. CSS is for web page formatting.

  • I heard someone claim that VI could edit C++ source/header files simultaneously intelligently interspersed.. is that so?

  • Simple macro? Yes..

    TextMate anyone?

  • hohohoh, yes it can. --emacs user

  • I know this sound stupid, but can you compile code in VI?

    Or do you just load the files into an IDE and compile them from there?

  • You CAN invoke the shell from within the vi editor and then directly invoke the compiler (for compiling your code from shell).

  • Hmm, I'll see what I can dig up there, haven't done anything like that before so I'm 100% green. Thanks.

  • just type :make in vim to compile...

  • is there a version of VIM which uses ctrl-xcv, shift-select ? do like the idea of it but the key layout is very alien

  • walter0bz: whats wrong with selecting and then just pressing y to copy, d to cut, or p to paste? Why do you want ctrl+x/c/v, when vim's keys are even simpler. If you really, really want theat, then map the keys manually and put it in your vimrc.

  • how does it 'select'?

    ctrl-p seems to do completion for me, seems interesting but not 'paste'

    Is there a single key to 'cut line'

  • walter0bz: To select, press v and move the cursor, or simply drag using the mouse like you select in any editor (if using Gvim or Vim with X). I didn't say ctrl+p, I said p. Simply press p to paste. To cut a line, you can press either shift+v followed by 'd', or press 'd' two times in a row. Remember you must do all this outside of insert-mode.

  • @walter0bz

    Cream is a version of VIM that uses Ctrl+V, Ctrl+C, etc, and shift-select - keys just like a GUI app.

    It's actually pure VIM, which is customised. You could customise those keys yourself too.

  • vi is awesome

  • uhuh try emacs and come back :)

  • lol wat

  • HOLY CRAP!!

  • How do you run the macro across a range of lines or 'to marker' ? It seems silly to have to know the # of lines in advance..

  • Youtube won't let me post it because it looks like html, but you can do the same thing with a simple regular expression. Often faster and (once you're familiar with regexps) easier than recording macros.

    It's basically a search and replace for

    "anything followed by 4 sets of numbers" with "html row, anything in a cell, each set in a cell, end row". I wish I could show you here. Look for :%s/.../.../

  • This is a great point. I use regex a lot in programming, but find the Vim regex engine can be a little esoteric. Since I lack confidence with them anyway, I end up spending hours editing regex Vim. Trying to work out whether something isn't working because I've done something wrong, or there's some character Vim's regex engine needs some character to be escaped.

    So, in the end, I gravitate toward using macros. :)

    However, there is a fantastic plugin for Vim called 'VimRegEx'

  • @jeevesbond Try using RegexBuddy for regexes. Easier to learn them too.

  • > I just hope that most programmers are not involved in this kind of stuff.

    Lots are, many programmers find they can write code a lot faster in Vim than an IDE. It's totally a matter of choice though.

    Vim can do the code manipulation you speak of. Including code completion and refactoring. I program in PHP using Vim, for example, including real-time debugging using XDebug. There's more to Vim than you might think. ;)

  • I know very well that you can extend Vim in order to do what you need. But then you could use VS in the first place as well. My point was and is not that vim should not be used, but that all those nice text editing functionalities have nothing to do with coding, coding is about thinking and manipulating code, that rarely involves repeating 100 times the same operation or doing complex searches. But I know that vim and emacs can be good for editing code as well. They're just harder to learn.

  • vim and emacs are created by programmers for programmers, and have been in development since 1976.

    They have all the functions for editing code, and more(specially emacs, which has a built-in shrink).

    But if you really want to get work done, there's always ed.

  • Vim (and VI) are fantastic for many reasons, not the least of which is the ability to move around in a file without moving your hands off the main keys.

    While in command mode, hjkl do left, down, up, and right respectively. You can run all over the screen with your cursor without ever moving your hands off the main keys. That saves huge amounts of time.

    Using a mouse for positioning the cursor is really slow, and moving your right hand to the arrow keys is also quite slow.

  • And yet, neither Eclipse or Visual Studio can do what was shown in the video. And they're both inordinately bloated.

    I can appreciate that some people prefer a fully-fledged IDE, but there's no need to slag off the choices of others. Particularly when all you achieve in so doing is advertise the fact you couldn't be arsed to learn the software.

  • You really could'nt be more wrong with your opinion about Emacs and tabs.

    Maybe you tried to code either Java or C++ code? Emacs have different modes ie. for "plain text" like ".txt" or java source code ".java". When you open emacs like this "emacs Hello.java", you'll end up using Emacs java-mode. In this mode (and C/C++ too), when you press tab, your current line automagically goes to the right identation, and not more! And that's the only feature I have really missed in my beloved Eclipse.

  • I know that. I was talking about my first experiences with those editors. It was a nightmare.

    If they work for other people, that's fine; I'm glad for you. They're just not my style.

  • Vim is hard to learn, but it pays off. When I started using it, it pissed me off all the time, but it's just a matter of time. I am sure if you gave it more time you would love it.

  • imagine if typewriters had been invented before shorthand writing systems -- they would never have taken off

    but in the case of shorthand (eg Gregg shorthand,) typewriters were an honest replacement. they were faster and easier. in the case of code *text* editing, GUI manipulations are simply a different, much slower way of doing things -- but it's easier for newbies who don't realize they may spend the next 10+ years programming and should invest in the best tools

  • Vi, maybe. Vim on the other hand has scrollbars, tabs and works correctly with arrow keys.

    In short: you're talking out yer arse mate.

  • Gnu Emacs can do it all much better.

  • Why was this voted so bad?

    Give me an explanation.

  • who voted? What are you talking about?

  • iromanovsky's post.

  • They voted this way because here gathered renegades, worshipers of the wicked vi editor. (vi vi vi = 6 6 6).

    The holy truth is that GNU Emacs (God bless it)is the best editor in the Universe, much better than anything else. Can you play "tetris" inside vi? NO! Can you read e-mail in vi? No! Can you run debugger inside vi? No!

    Can you talk to psychoanalyst in vi? No!

    Can vi answer phone calls? No!

    Can vi prepare breakfast for you? No!

    So vi is not as good as some people say.

  • Well, if flexibility is your standard, Emacs, as good as it is, fails. Windows, Linux, OS X all can do much more things than Emacs can.

    To use your line of reasoning, can Emacs do wifi? Can Emacs manage your photo library? Can Emacs edit or HD video? Nope. Does that mean it sucks as an editor? Not really.

    Because VI/Vim cannot do some of the non-editor things that Emacs can do, does that mean it's not as good as Emacs? No.

    I suspect you just have a fondness for CTRL key.

  • They voted this way because here gathered renegades, worshipers of the wicked vi editor. (vi vi vi = 6 6 6).

    The holy truth is that GNU Emacs (God bless it)is the best editor in the Universe, much better than anything else. Can you play "tetris" inside vi? NO! Can you read e-mail in vi? No! Can you run debugger inside vi? No!

    Can you talk to psychoanalyst in vi? No!

    Can vi answer phone calls? No!

    Can vi prepare breakfast for you? No!

    So vi is not as good as some people say.

  • emacs is a good IDE, but Vi's modal editing model is much more flexible and powerful than emacs' C-blah hotkeys

    where in emacs you work close to the text, vim promotes a higher-level view that grants significant efficiency gains. eg, the . operator which repeats the last whole edit

    when using Vi you're in command mode most of the time, like a hawk scouting the landscape. when something needs editing, you swoop down to the precise spot, instantly slice things up, and return to your flight

  • You just do not know, but emacs can behave like vi. Type "M-x vi-mode" and you will have your beloved vi with its dot i.e. "operator which repeats the last whole edit" and be "like a hawk scouting the landscape".

    You can type "Ctrl-x Esc Esc" and it will repeat to you any of your last big commands (like in bash you can browse your history). Actually you do not need to type the M-x commands every time - you can assign these commands to F1 - F24 keys, or to Ctrl-something or Meta-something

  • indeed. vi's editing model is so nice a few editors out there have an emulation for it. i see that as a victory :)

    though i use too many of the advanced Vim features (time travel, g+/-, non-trivial movement and editing sequences, lack of uglyness, etc) to be comfortable with an emulation

  • > vi's editing model is so nice a

    > few editors out there have an

    > emulation for it. i see that as a

    > victory :)

    vi mode in Emacs is not a "victory of vi"!

    vi mode in Emacs is made for people with bad habits, who want to quit. It is like a nicotine patch for a heavy smoker, who wants to quit. Get rid of vi. You do not need it - Emacs is better.

    By the way, Emacs can also do time traveling and teleportation and other non-trivial movements in space-time continuum.

  • emacs is better because of its extensibility.

    vi is better because of its editing model.

    That is all.

  • Agreed. With emacs, viper and vimpulse you would probably get the ultimate editor. I haven't got my foot around emacs yet but am inclined to switch because of what you mention.

  • Time travel g+/- is also emulated nicely in Emacs vi-mode....

    I doubt that there is a vi command that Emacs can't emulate, or even extend.

    The built-in "time travel" system in Emacs is even more powerful, you can even travel back your own travels within the whole Emacs session, and set macros involving multiple files and travel in time through all the files/directories you visited and all the things you have done.

  • Sorry... that was a response for Techra.

    In Emacs, keyshortcuts are just a way to execute commands.

    The commands written in Lisp are the real heart. It has nothing to do with "C-blah hotkeys", it can be customized to press "F6" or "ESC g +" or anything you want to, instead of "C-blah".

    Macros in Emacs are lists of commands, not keys. You can even open, rename, save, close multiple files and add all of it to a macro. All can be macroed or can be extended/customizable via hooks for that command.

  • it was probably voted down because THEY didn't give an explanation of just how "emacs can do it all much better" -- anyone wanna offer one in his stead?

  • Can Your Editor do This?

    yes, all mines can do it. the only things they can't do as vim is to be so fast and so lightweighted (but for what I care...).

    pspad, for example, can do this with macro or regex replace, and it can handle well block moving.

    Is there another video that shows what else can do vim so "wonderfully"?

  • You used the Shft+V VISUAL LINE mode to indent that text. Is there a reason why you didn't use Ctrl+v VISUAL BLOCK mode?

  • very good!

    I only use vim too.. the best!

  • how do you tab multiple lines a once?

  • Use the Shift key to select several lines, and then type >>.

  • thanks

  • In that video I'm pretty sure he entered visual mode 'v', then selected the block, perhaps using 'ab', then '>>'. You can also type the number of lines to shift as a multiplier prefix. eg. '3>>' will shift three lines.

  • Looking more carefully, he marked a spot (mm), moved up by the "search previous" command (#) which moved to the previous <tbody>, entered visual line mode (V), then moved to the mark ('m). The (vab) for selecting blocks only works on parentheses and curly brackets. A useful way of selecting blocks in HTML is by moving to the opening/closing tag, entering visual line mode (V) and then using the search next or previous command (*) or (#).

  • EMACS!!

    ahh, the flames...

  • vim4life... making the simple things even simpler

  • wtf! I wanna learn how to do that. I use vim but only for quick edits. I know people say it can be amazingly powerful, I tried, but it's a pain in the ass to learn.

  • But WELL WORTH the time spent learning it. What's several hours or days mastering commands compared to a life of use and vi/vim is fun.

  • Sed is very useful, although I was already in Vim and it hardly took any time to do.

    I did use macros, press qq then @q as jeduan pointed out. To repeat it over and over I just put a number in front of the @q, e.g. 54@q repeats the macro 54 times. :)

  • Nice, though it'd take less time if you used raw sed.

  • I believe he uses macros. You first do qq, do all the stuff and then @@

  • so what vim scripts do you use? it's too small to see

  • Vim is total pwnage ^^

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more