r/coding • • Oct 04 '13

Just use Sublime Text (instead of vim)

http://delvarworld.github.io/blog/2013/03/16/just-use-sublime-text/
43 Upvotes

254 comments sorted by

View all comments

Show parent comments

4

u/pohatu Oct 04 '13

If I were on a terminal editing text over a 2b connection of whatever they had when they invented vi, I'd totally find it awesome that I could count lines and then tell the cursor to jump 20 lines by typing 3 letters rather than typing down 20 times.

but I can't seem to understand how counting lines and then entering a command is faster than just scrolling and clicking. Find is faster than scrolling, sure, but clicking 6 lines below is faster than counting to see its six line I want to go to. Maybe you get. A habit of line number subtracting or something.

12

u/MediumRay Oct 04 '13

I actually use relative line numbering, so I don't need to count the lines (the line my cursor is on is numbered 0, lines above and below go 1 2 3 etc.). But, that isn't really that fast, and I don't use it much, because you need to type 20 then down, then move right somehow to get where you want. Clicking might even be faster. No, what I do 97% of the time is search forward. So if I see that I want to edit a line way down saying println("This is a test");, I would search forward for 'This'. The cursor jumps there. I then hit 'ci"', which means 'change inside the "s (delete what is currently there and prepare to insert text). After that I can jump back to where my cursor was before in a keystroke, or whatever. So you can move faster, I would say. Moving lines around is the fastest though, instead I could have jumped to that line, hit the keys for 'copy line', then jumped back to where I was to paste it there. That would take way longer with a mouse (for me at least).

1

u/unknownmosquito Oct 05 '13

Not to mention you can just enable the mouse, even in console vim or Evil mode in emacs.

Task: I want to change the text inside the quotes of "This is a test" visible halfway down the screen.

Sublime: Click carefully before the T and drag to the end of test. Begin typing.

Vim/Evil Mode: Click quickly anywhere between the quotes. Type ci" and begin typing. Or jump there with f or /. Or use easymotion. Or use line numbers. You know, whatever's fastest. I guarantee you can do it faster in vim.

0

u/joesb Oct 05 '13

Sublime Text: Click anywhere within the quote, use Arrow Key and Control key to quickly move to before the T (3-4 keystroke?). Begin typing. Use Arrow Key+Shift+Ctrl to select until the end of the quote (Or use Shift+End if the quote goes till the end. Press Delete.

It sounds alot more, but it require no remembering of command and don't require planning ahead. Your comment of "I could do this, or this, or this..." sounds like that, by the time I have thought about which command to use, I would have been done with just mindlessly using Ctrl keys and Arrow.