Just use sublime text (anti-vim rant)



  • I was reading this guy's blog for his react stuff (also excellent), when I stumbled upon this.

    A delightful anti-vim rant by a vim user who seems to know what he's talking about.

    To code in Vim, you have to keep Vim in your head just as much as the code that you're editing. You have to constantly think about what you're doing.

    Maybe this is a good thing. Maybe it encourages efficiency and refinement of practices. But you know what? I don't want to deal with that. I don't want to have to remember what @@ does or what :v/\v does or a fractal web of things to accomplish basic tasks. Despite this, I do. I spend at least an hour a week working on Vim-fu. But I don't want to. I want to edit text. I don't want to read yet another tutorial that counteracts something else I had finally got down so that I can rename a function correctly. I just want to make things. Perhaps it's a necessary evil. Perhaps at year 10 it will all have been worth it because I won't have to think to do things. I don't know.

    After four years of Vim use, 700 hand written lines in my .vimrc, and 45 plugins, I cannot in good faith recommend that someone start the Vim journey.

    I disagree with his "either vim or sublime" mindset (there are other choices out there). But if I ever had any dreams about getting into vim, they are pretty much dispersed. Highly recommended read.


  • Java Dev

    Don't over-automate.


  • I survived the hour long Uno hand

    I even question his assertion that you need to know vim to edit on a server. I use nano. I don't need to know anything more complex than ctrl-x for exit, since it prompts me if I want to save or not. Done.


  • Banned

    This guy sounds like he has serious mental problems if he hates vim yet still uses it.

    @Yamikuronue said:

    I use nano. I don't need to know anything more complex than ctrl-x for exit

    And in case you forget even that bit, it's always on the bottom of screen.


  • FoxDev

    If you want my recommendation.... Learn Vim, but only so far as to get comfortable enough that you cna use it to make whatever config changes you need to to get a system back on its feet. other editors might not be available but vi or vim is pretty much guaranteed to be installed.

    after that use whatever the hell editor you want. :-D



  • @accalia said:

    If you want my recommendation.... Learn Vim, but only so far as to get comfortable enough that you cna use it to make whatever config changes you need to to get a system back on its feet. other editors might not be available but vi or vim is pretty much guaranteed to be installed.

    after that use whatever the hell editor you want. :-D

    Why not just transfer files by scp/ftp/whatever*? Then you could edit the files locally in an editor with intellisense and code completion ... If you don't have a rollback/backup to recover to, I feel you're in @CodingHorrorBot territory.

    * I'm actually asking why you wouldn't do it that way - I can't see a reason why you would use vim over a file transfer and/or a backup to recover a system.


  • 🔀

    @rad131304 Is Doing It Wrong™


  • Discourse touched me in a no-no place

    @rad131304 said:

    I can't see a reason why you would use vim over a file transfer and/or a backup to recover a system.

    If you're trying to bring networking back up, file transfers aren't very useful, yet being able to get access to a console (there are some very useful pieces of hardware for this sort of thing) would be enough for running vi.


  • FoxDev

    @rad131304 said:

    * I'm actually asking why you wouldn't do it that way - I can't see a reason why you would use vim over a file transfer and/or a backup to recover a system.

    because the system might be so messed up that it can't connect to the network to do something like that. I'm talking about a catastrophic failure here.

    if it's an issue at the app layer then my advise is not applicable because other options are available (including our friend apt-get/yum/emerge)



  • @dkf said:

    If you're trying to bring networking back up, file transfers aren't very useful, yet being able to get access to a console (there are some very useful pieces of hardware for this sort of thing) would be enough for running vi.

    Even sneakernet?

    Note: I'm still being serious here - why wouldn't sneakernet + better editor be less of a hassle than learning vi. I remember almost throwing computers in college because I hated using it so much.



  • Eh, I've been using vim far longer than 4 years. I can't remember the last time I messed around in my .vimrc/.gvimrc. I also don't use a shit-ton of plugins. Probably, I don't even use too many of vim:s built-in features.

    It's a fucking text editor. I like the modal editing for some reason, which is one reason I ended up sticking with it. The other reason would be that it's available pretty much everywhere (and it's still somewhat fully featured).

    As for the rest? I'm pretty sure you can go seriously overboard configuring and customizing Sublime text (or Visual Studio, or whatever) with a zillion of plugins and other customizations. Maybe vim has a few more options/plugins/whatever ... who knows? Doesn't mean you have to use all of them.



  • I assume you install Gnome/KDE on your servers?


  • Grade A Premium Asshole

    @ben_lubar said:

    I assume you install Gnome/KDE on your servers?

    I see what you are trying to say here, but unless it is a trivial change, we tend to do everything as he says. Edit it over SCP, FTP, whatever the case may be. Keep the window manager off the server to keep overhead down, but edit files on another machine where we have a GUI.



  • Editing it on a different computer isn't very helpful if you can't get networking working.


  • FoxDev

    @ben_lubar said:

    Editing it on a different computer isn't very helpful if you can't get networking working.

    exactly my point!



  • @cvi said:

    I can't remember the last time I messed around in my .vimrc/.gvimrc. I also don't use a shit-ton of plugins. Probably, I don't even use too many of vim:s built-in features.
    This. I've been using ed/vi/vim/gvim for something like 30 years. My .vimrc is all of 7 lines. The only plugin I have is syntax highlighting for a language that's not part of the normal distro. I know I don't use a lot of features; I learned to use it before those features even existed. Would I be more efficient if I knew how to use some of the fancier features? Maybe, but I know how to do what I need to do. It's a B*****ming text editor: Open, save, insert, delete, search, replace, give it a hint for syntax highlighting when it can't guess the file type. More than that is gravy — nice, but not necessary.

    Filed under: Get off my lawn!


  • Grade A Premium Asshole

    @ben_lubar said:

    Editing it on a different computer isn't very helpful if you can't get networking working.

    No doubt, but I honestly cannot remember the last time I typed "sudo nano filename" and got an error. What distros do not include it by default?


  • Grade A Premium Asshole

    Also, I cannot remember the last time I had a server so Belgium-ed that networking was not working...but did not require recovering from backup. It is a pretty narrow use-case where Vim skills are necessary.


  • Winner of the 2016 Presidential Election

    @Polygeekery said:

    What distros do not include it by default?

    Neither my NAS nor the chroot environment my web hoster provides have nano installed.



  • @ben_lubar said:

    I assume you install Gnome/KDE on your servers?

    No.

    If a machine is so FUBAR that I've got to physically be at it to get information in/out, I'm going to use the shell to copy to a USB drive the files I need to edit, and then do work on a functional machine. If that doesn't work, I'm probably going to do a nuke and pave from disk. Depending on the issue (e.g. malware), I might even opt for a nuke and pave over file copy anyway. That's why you test your server backups regularly.


  • Grade A Premium Asshole

    OK, so if you want to root around in a NAS, or you have crappy hosting, you might need it. ;-)


  • Winner of the 2016 Presidential Election

    @Polygeekery said:

    crappy hosting

    That hosting company is actually pretty good (for instance, they allow you to install a lot of software – unfortunately not nano – via a web interface), I’m just too lazy and cheap to get a root server for my personal stuff. ;-)



  • @accalia said:

    @ben_lubar said:
    Editing it on a different computer isn't very helpful if you can't get networking working.

    exactly my point!

    If sneakernet is broken, you've got bigger problems.



  • @HardwareGeek said:

    This. I've been using ed/vi/vim/gvim for something like 30 years. My .vimrc is all of 7 lines. The only plugin I have is syntax highlighting for a language that's not part of the normal distro. I know I don't use a lot of features; I learned to use it before those features even existed. Would I be more efficient if I knew how to use some of the fancier features? Maybe, but I know how to do what I need to do. It's a B*****ming text editor: Open, save, insert, delete, search, replace, give it a hint for syntax highlighting when it can't guess the file type. More than that is gravy — nice, but not necessary.

    Filed under: Get off my lawn!

    you know, I vaguely remember using VIM syntax highlighting now - probably like the last month I used it back in college when I finally discovered it could do that. I literally haven't used vim for a decade so my fault for not remembering it could do that.


  • Grade A Premium Asshole

    @asdf said:

    That hosting company is actually pretty good

    I was just screwing with you. But for even that, "Vim skills" are not necessary. Just a quick edit and away you go. The very basics will handle that.


  • FoxDev

    @rad131304 said:

    If sneakernet is broken, you've got bigger problems.

    why take several minutes to edit a config file when i can do it in seconds by just knowing the text editor on the system.

    :-P



  • @accalia said:

    why take several minutes to edit a config file when i can do it in seconds by just knowing the text editor on the system.

    :-P

    1. In a situation where you can't remote into the system, how often is it really that simple?
    2. If it is that simple, the man page will tell me how to save.

  • FoxDev

    @rad131304 said:

    In a situation where you can't remote into the system, how often is it really that simple?

    rarely, but poking around in random files via sneakernet is really really slow!

    😆



  • @accalia said:

    rarely, but poking around in random files via sneakernet is really really slow!

    😆

    No argument there - but if it's that bad, and it's a server, why not just restore from backup?


  • FoxDev

    because maybe the sysadmin before you never checked to see if the backups were working....

    😆



  • @rad131304 said:

    If sneakernet is broken, you've got bigger problems.

    I've had to repair servers that were fubared by new QA engineers. Sneaker-net isn't practical as the servers are offsite and I doubt I'd be allowed in if I drove there.
    But we have iLO/DRAC/IBM RSA. I can usually connect to that and that usually doesn't have some remote USB feature.
    So if I can log in then I can check out all the configuration and use vim to fix the usual typos that they make.



  • Is this a thing that happens once a decade, or a thing that happens 3 times a week?

    Because it seems pretty fucking stupid to optimize for the once a decade use-case. And Linux people are all always telling me how reliable it is-- it's so reliable that you have to be prepared to repair an OS without working networking at a moment's notice? Seriously?

    Hey instead of learning Vim, maybe Linux gets its fucking shit together, huh? So it's not breaking all the time? Maybe do that? Yeah.



  • Linux is reliable in the sense that "You only need to reboot once a year, if that."

    What they don't mention is that the networking stack falls over in the slightest zeypher, with the filesystems writing to the dmesg log like windchimes in the breeze, and God help you if you want to do anything complicated with graphics. But at least you don't need to reboot.


    Filed under: at least all of Windows crashes at the same time, we need a new tag cloud to attack



  • @cartman82 said:

    700 hand written lines in my .vimrc, and 45 plugins

    Doing. It. Wrong.™



  • Here's my entire .vimrc that I use for editing code in at least 5 distinct languages: <javascript, go, ruby, c++, bash>

    set background=dark
    
    let g:go_snippet_engine = "neosnippet"
    let g:neocomplete#enable_at_startup = 1
    let g:go_fmt_command = "goimports"
    
    call pathogen#infect()
    
    filetype plugin indent on
    syntax on
    set autoindent
    set hls
    set modeline
    
    inoremap <expr><TAB>  pumvisible() ? "\<C-n>" : "\<TAB>"
    


  • I have around 30 or 40 lines in my .vimrc, but a lot of that is unnecessary cruft I've been carrying around for 15 years from my first ever .vimrc where I had no idea what I was doing.
    Filed under: I am also doing it wrong, just not as wrong as that guy, bad workmen always blame good tools



  • @accalia said:

    If you want my recommendation.... Learn Vim, but only so far as to get comfortable enough that you cna use it to make whatever config changes you need to to get a system back on its feet. other editors might not be available but vi or vim is pretty much guaranteed to be installed.

    after that use whatever the hell editor you want.

    I know how to enter insert mode, paste the content I edited in sublime or jetbrains scratch file, exit insert mode and save. That's enough for anyone.

    @cvi said:

    As for the rest? I'm pretty sure you can go seriously overboard configuring and customizing Sublime text (or Visual Studio, or whatever) with a zillion of plugins and other customizations. Maybe vim has a few more options/plugins/whatever ... who knows? Doesn't mean you have to use all of them.

    You actually can't extend sublime text all that much. Text editor UI is pretty much locked up, beyond a few configuration points. You would think there's a way to change highlighting style of "select all occurrences", but no.

    It's a good editor, but it's not panacea.



  • TIL vim people are very concerned with how small their .vimrc is. Settle down guys, I believe you, no need to wave it around.



  • @cartman82 said:

    vim people are very concerned with how small their .vimrc is

    I'm not really concerned about how big or small my .vimrc file is. But somebody with a 700-line file is vastly over-complicating it; a huge .vimrc and zillion plugins are not necessary to use vim well, and certainly not for "basic tasks."



  • Well, I remember there being no nano on busybox distros. So, uh, there's an use case? Granted, you only need to know how to enter insert mode, write your stuff, press escape and type :wq for most of the time. And nano is probably only not included because vi is a cancer.

    But whatever.



  • Basically, this topic is summarized thus:

    Guy builds Rube Goldberg machine out of Vim. Rube Goldberg machine falls over, surprising nobody except that guy. Somehow this is Vim's fault, not that guy's. Everyone had tea and cake, went home and lived happily ever after, except that guy.


  • BINNED

    @cvi said:

    I'm pretty sure you can go seriously overboard configuring and customizing Sublime text (or Visual Studio, or whatever) with a zillion of plugins and other customizations.

    I actually have no plugins in vim while I have like 5 in Sublime. Granted, most of my vim use is the already mentioned "get a server working" use case which might be the main reason for it: I can't rely on my specific set of plugins on a freshly installed / server I didn't set up.

    I just need to edit the fracking /etc/network/interfaces and /etc/apt/sources/list, I'm not gonna spend 2 hours messing with my .vimrc for that.

    Oh, no, wait, I lie: I have powerline installed on my computer which adds some stylings to vim so the UI (what little of it there is) is a bit more readable.


  • Banned

    Am I the only one here who uses full-blown IDE for Linux programming?


  • BINNED

    @Gaska said:

    Am I the only one here who uses full-blown IDE for Linux programming?

    I use QtCreator for C/C++ stuff. But I'm still to find an IDE that I'd use for web stuff. They usually fail at syntax highliting multiple languages when I'm prototyping something (Sublime handles it rather well), and I probably wouldn't use half the fancy features anyway so...


  • Banned

    @Onyx said:

    multiple languages

    Your problem right here.



  • @Gaska said:

    Am I the only one here who uses full-blown IDE for Linux programming?

    I use Vim for C++ dev on Linux, so, no, you're not the only one :<snerk>P
    Filed under: I've dabbled in Eclipse from time to time, even built it from /usr/ports on FreeBSD...


  • BINNED

    @Gaska said:

    Your problem right here.

    As I said, prototyping. Easier to handle in inspector, or to add a quick and dirty bit of inline JS and / or CSS just to test things out. Setting up a proper file and directory structure (not to mention a virtual host if I need some php in it as well) for something I might well as scrap after 5 minutes of fiddling with it is a pain in the bottom.


  • Banned

    I'm not saying that you're Doing It Wrong™. I'm saying the tools consider your workflow Doing It Wrong™ and refuse to cooperate because mixing languages leads to terrible, terrible maintenance in the long run.


  • Banned

    A nice parable would be, when I say you're spending too much money on fast foods, I'm not necessarily criticizing you, but I might be criticizing the fast foods for way too high prices.


  • BINNED

    @Gaska said:

    I'm saying the tools consider your workflow Doing It Wrong™

    Well, I found one that I somewhat convinced to cooperate. We're buddies now.


Log in to reply