10 ms·
I'm pretty new to heavy console-based Linux adminning - I just have a raspbian pi4 I'm using for a bunch of local services around my house, but I've gotten pret
by Pxtl 6y ago
I'm pretty new to heavy console-based Linux adminning - I just have a raspbian pi4 I'm using for a bunch of local services around my house, but I've gotten pretty comfy editing files and tweaking services and chmodding/chowning.
However, I refuse to climb the learning cliff of Vi, but nano is... Okay at best?
Is mcedit a good option? I'm still just doing everything from shell and nano.
- adamweld 6y agoIf you're interested in becoming proficient text editing in the shell, I highly recommend just biting the bullet and learning the basics with vim. It's significantly less of a "cliff" than you'd expect. Just spend a few minutes running through the built-in tutorial (vimtutor), learn how to save and open files and move around the document, and set a few defaults in your config. Only about 30 minutes of effort will be enough to make it much easier to use than nano, in my opinion. Then over time you can learn what makes it powerful, play with mouse control, check out neovim, etc...
- lilyball 6y agoThere’s also https://vim-adventures.com/ https://vim-adventures.com/ which is a neat way of learning Vim by playing a game.
- indigodaddy 6y agoUpvoting/seconding this. It doesn’t take as much effort/pain as you think it will. Don’t believe the FUD. That said, plain old vi on older Solaris systems is still a pain in the ass lol.
- cutemonster 6y agoVim is lovely, I always install Vim plugins in all editors. Pxtl, just be careful so you don't get stuck in Ex mode o.O
- ilaksh 6y ago30 minutes of effort will NOT make vim much easier to use than nano. That's ridiculous. People, get your mind out of the 1970s and check out the micro editor.
- dbtc 6y agoMaybe try thinking of vi as a programming language (for interacting with text) rather than a text editor. It's really a Human Programming Interface (HPA not API?) which you can run in the line editor of your shell (readline), or in emacs, tmux, even firefox, but of course it works best in vi/vim/nvim. Learning the vi language makes me think about interacting with computers in a new way.
- ilaksh 6y agoI recently discovered 'micro' which is along the lines of nano in a way but more modern and just about perfect for me. I wish TextAdept had become more popular since I always thought it was a strong choice for a modern editor with solid Lua customization support. But it seems like 'micro' is the popular one. Has 16000 stars on GitHub.
- ilaksh 6y agoAs someone who has wasted like 30 years off and on learning how to edit like it's 1979 in vim, I recommend you do not do get peer-pressured into that. Take a look at micro or TextAdept or use gedit with sshfs or VSCode or.. just something from recent decades.
- weaksauce 6y agoyou don't need to eschew model editing if you go to something like vscode... there's a great neovim plugin for vscode that gives you full vim in the background but also has a nicer vscode interface for the frontend.
- ilaksh 6y agoI just suspect that people who advocate for modal editing and hjkl etc. think that those things are some grand UX secret that only real nerds know about. But really they are just artifacts of that particular historical circumstance. http://xahlee.info/kbd/keyboard_hardware_and_key_choices.html http://xahlee.info/kbd/keyboard_hardware_and_key_choices.htm... "How did vi's mode switching idea came from? Back in 1970s, terminal screen are 80 columns by 24 lines. There's no real-time editing. You edit by typing a command, then call another command to have the screen update to show the result of your command. Vi's “modal editing” is evolved from this. This is also why emacs's manual calls itself “Real Time Display Editor”. Emacs is the first or one of the first “Real Time Display” editor. Why vi uses j k h l for cursor movement? Unix vi's use of j k h i for cursor movement, and the choice of Escape key for mode switching, came from the keyboard it was developed on, the ADM-3A terminal."
- weaksauce 6y ago> I just suspect that people who advocate for modal editing and hjkl etc. think that those things are some grand UX secret that only real nerds know about. But really they are just artifacts of that particular historical circumstance. while it's true that it was born of historical necessity and the decisions for it were partly due to keyboard constraints and the other constraints, I disagree vehemently with the assertion that it's not a more efficient way to edit code. writing a screenplay? maybe not but programming? yes... especially in the context of a larger ide.
- weaksauce 6y agoIf you think of vim as a language to edit text it becomes a lot easier to remember how to do something... if you just try to memorize a bunch of incantations it will be awful. for instance in normal mode where you issue commands to edit text(opposed to insert mode which is akin to any other editor where it's mostly just typing information into the document) you can issue something like delete a(round) word and it deletes the word `daw`. or delete inner word `diw`. want to change a word? change d to c and it deletes the word and leaves you in insert mode to type. all of the commands are very composable and form a "language" to edit text that's a lot more approachable than you'd think. one fun one is something like `ci'` or `ci"` which will if you are on a line with an open and closing " or ' will search forward in the line for a " or ' and delete what's inside that and leave you in insert mode to make your edits.... some more fun reading: https://gist.github.com/nifl/1178878 https://gist.github.com/nifl/1178878
- theonemind 6y agoYou'll probably save yourself a lot of trouble if you can edit with vi. It's installed everywhere, and editors like nano are really painful without a mouse. I don't recommend wasting your time getting great with it or anything. Just enough to be able to use it to do anything you could do with nano...but it will be 3x faster and easier on a console instead of using nano if you learn enough to do what you can do with nano with it.