There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

lemmy.fosshost.com

StephenTallentyre , to linux in How dare you use a text editor because it's easy to use

deleted_by_author

  • Loading...
  • LovePoson ,
    @LovePoson@lemmy.world avatar

    Cap

    zaphod ,

    Whenever I open Nano basically all the commands it has are listed at the bottom, for small things it’s perfectly fine.

    PseudoSpock , to linux in How dare you use a text editor because it's easy to use
    @PseudoSpock@lemmy.dbzer0.com avatar

    There is always the Joe editor, if you like good ol’ Wordstar. :)

    ArcaneSlime ,

    I’ve been known to watch a fight video there every now and again, yes.

    jmcs , to linux in How dare you use a text editor because it's easy to use

    Easy is relative. What are you trying to do? Replace a value in an yaml file? Then nano is easier. Trying to refactor a business critical perl/brainfuck polyglot script in production? Then you probably want to use vim (or emacs if you are one of those people)

    grysbok ,
    @grysbok@lemmy.sdf.org avatar

    Walk someone else through editing a config file on the command-line over screenshare? Nano. Omg nano is your friend.

    spongeborgcubepants ,

    Replacing a value in a config file is still easier in vim due to e.g. ciw being a thing.

    notfromhere ,

    Honestly, roll back to previous release for production and use best IDE your developers are used to on their local machines, test the fix in a non production environment then release to prod. When is editing business critical scripts in production really needed?

    jmcs ,

    It was a joke to make the point that vim can be the easiest tool to use if you are trying to do a complex task.

    notfromhere ,

    I’m a bit slow on the uptake there haha. I started with vi and moved over to nano at some point and never looked back. I can refactor code in production with the best of them. There’s still some tricks I’ve seen done in vi that amazes me that I haven’t tried to figure out in nano, but for the most part it’s fairly easy to use to do nearly anything in. Even supports color for supported files, YAML, etc.

    FMT99 , to linux in How dare you use a text editor because it's easy to use
    mariusafa ,

    Vscode is malware

    sunbunman ,

    VScodium is FOSS though

    stebo02 ,
    @stebo02@lemmy.dbzer0.com avatar

    ?

    fluxion ,

    IME?

    gigachad ,

    Integrated Mevelopment Environment. You should have known this

    jaybone ,

    I’m a meveloper

    gigachad ,

    MevOps Engineer

    jaybone ,

    My mate mevops

    ObsidianZed ,

    tips fedora M’eveloper

    socsa ,

    The M stands for beefcake

    PlexSheep ,

    That acronym usually stands for “Input Method Editor” and describes the program that makes people able to type east Asian characters with a usual keyboard.

    日本語は楽しいです。

    nieceandtows ,

    Integrated Memeing Environment

    MidsizedSedan , to linux in How dare you use a text editor because it's easy to use

    I once fixed my bashrc file with libreoffice

    deuleb_biezelbob ,
    @deuleb_biezelbob@programming.dev avatar

    calm down satan

    voracitude ,

    I regularly fix my bashrc file with Notepad. I run it in Wine because I cbf to RealVNC from my Windows CE media server.

    (n.b: None of this is real, I wrote it to upset people, I’m sorry)

    riodoro1 ,

    Well let me upset you.

    Ive been helping my coworker on a call and he was sharing his screen. I told him to edit a file (add a line) on a linux box we develop and he copied the file to his windows host with winscp, edited it in notepad and copied it back. I fantasize about killing him ever since.

    voracitude ,

    That’s crazy! At my job, I just help our users. I don’t have to build (and then maintain) infrastructure with them.

    dgriffith ,

    They need to learn how to use their tools better. Winscp does all that transparently for you if you press F4 on a file on a remote system. Or maybe they did and you just didn’t see it…

    It’s quite a handy function when you’re diving through endless layers of directories on a remote box looking for one config file amongst many.

    SexualPolytope ,
    @SexualPolytope@lemmy.sdf.org avatar

    I prefer Office 365 online.

    nieceandtows ,

    Come back after your uploaded it to the cloud and edited it using Google docs.

    pedz , to linux in How dare you use a text editor because it's easy to use

    Sometimes you don’t even have the luxury of nano. Any moderately advanced Linux user should probably learn the basics of vi. Just knowing how to insert text and save it can fix a system that’s stuck in recovery. Even if it’s just to add a comment in front of a line in a config file.

    Trantarius ,

    When does that even happen? If you have nano installed, wouldn’t it work too?

    pedz ,

    Not in rescue mode. If you can’t mount your root partition because something was fudged in /etc/fstab, for example, you may be stuck in recovery and depending on your distribution, it may not have nano in that minimalist mode.

    For me it also happens when I install a VM of Debian using the small image, on my dedicated server in a data center. The company hosting the server requires a special network configuration and AFAIK, there’s only vi. So i need to use the console to access the VM and from there, edit /etc/network/something with vi to setup the network. Once done I can reboot and install the rest of the software over the network, including nano.

    I’ve been using Linux for more than two decades. Before nano I was using pico, but it also required to have pine/alpine installed. So knowing the basics of vi has often been helpful over the years for me.

    Maybe it’s because I like tinkering with VMs and SBCs, and most people will not encounter situations where they don’t have nano, but it can happen. And you’ll be glad to know at least “i” and “:wq!”.

    Transtronaut , (edited )

    In a professional context, you might end up on servers that don’t have nano installed, but do have vi. Or if you’re helping out a friend on their laptop, they might not have the same software as you. Or if you often end up tinkering with random devices and/or setting up new systems it might be tedious to install the same applications every time.

    It’s basically an argument for learning the very basics of the most common editors so you have flexibility no matter where you end up. Even when you have the ability to download and install your preferred software, it’s still an extra step that might not be desirable for a variety of reasons. But if it’s just your own personal device, I see no problem with just installing whatever you prefer and running with it.

    EDIT: Personally, I find that I don’t end up using those other editors often enough to remember the abstruse commands of tools like vim, so I’m not worried about it. When it does happen, 99% of the time I can just whip out a smartphone and look up the directions for the n-dozenth time.

    JackbyDev ,

    I do like that some distros make visudo use Nano instead.

    thecheddarcheese ,

    you can change that really easily

    mactan ,

    Sometimes you don’t even have the luxury of vi. Any moderately advanced Linux user should probably learn the basics of sed. Just knowing how to insert text and save it can fix a system that’s stuck in recovery. Even if it’s just to add a comment in front of a line in a config file.

    Gacrux , to linux in How dare you use a text editor because it's easy to use
    @Gacrux@lemm.ee avatar

    is there not a single other person who uses helix?

    lenuup ,

    WTF is helix?

    Gacrux ,
    @Gacrux@lemm.ee avatar

    helix-editor.com

    essentially a terminal modal editor (like vim), but instead of specifying the action to perform then what to perform the action on (like “yank 3 lines”), in helix you select first, then perform actions on the selection (like “these 3 lines, i want them yanked”). it’s slightly better (according to others) because you get to see what you’re going to change in the file so you don’t accidentally delete 5 lines instead of deleting 4.

    on top of that many features are builtin, like tree-sitter and lsp support, so you don’t have to spend 5 hours looking for cool plugins and configuring everything to get started (my config file is only 50 lines of toml).

    the downside is that there isn’t support for plugins (yet), but there’s already things like a file picker, more than 100 themes etc.

    cmhe , (edited )

    So similar to kakoune? I tried that for a while, but it was missing some features so I went back to vim/neovim.

    I need to know vi anyway, because that is available everywhere (as part of busybox), so using vim/nvim for bigger systems just fits.

    nameisnotimportant ,
    @nameisnotimportant@lemmy.ml avatar

    Well I tried! I ended up using micro though

    smiletolerantly ,

    I gave it serious consideration when the death of Atom was announced and I was unsure where to move on to.

    Looks like in the meantime a lot has been done (as far as I remember, TreeSitter and LSP weren’t built in back then…? Not sure though), but the lack of a plugin system is still killing it for me.

    TBH it looks like it has 75% of the features you want from a codeditor, which is much more than the use-case for Nano, but no way to go the remaining 25% of the way.

    Underwaterbob ,

    the death of Atom

    I’m still in mourning.

    smiletolerantly ,

    It was pretty great, wasn’t it?

    Although I must say. I eventually landed on neovim. Steep, steep learning curve, but now I would not switch back again.

    Underwaterbob ,

    I would look at that, but I bounced off VIM hard, so probably not for me.

    spaceslug ,

    I like helix

    patatahooligan , (edited )
    @patatahooligan@lemmy.world avatar

    Helix’s editing model is so much better than vim’s. I would probably use it if it was be closer to a drop-in replacement for vim. I really hope this neovide issue gains some traction because I don’t think I can daily drive anything that isn’t as smooth as neovide again.

    wise_pancake ,

    I simply have too much vim config and muscle memory to ever leave vim

    I’m trapped in a prison of my own making!

    rhys , (edited )

    I used it for a while. The flipped mode of thinking with it was weird at first but I liked it once I got used to it.

    I don’t remember the specifics, but I vaguely recall encountering an issue with its LSP implementation that drove me toward thinking the whole LSP approach is insane and I went back to neovim.

    btp , to linux in How dare you use a text editor because it's easy to use
    @btp@lemmy.world avatar

    The best text editor is ‘$EDITOR’.

    0x0 ,

    I think you mean “$EDITOR”. Gotta have that variable expansion.

    namingthingsiseasy ,

    Not necessarily! I always run ln -s ‘/usr/bin/$EDITOR’ $(which $EDITOR) after a fresh install, so I have a valid executable on the path called $EDITOR.

    Of course, then I have to make sure to add export EDITOR=$EDITOR to my .bashrc. (Obviously.)

    sabin ,

    Well,.that’s one way to solve the problem of not expanding your editor var correctly…

    riodoro1 , to linux in How dare you use a text editor because it's easy to use

    Average vim user: vim is easy.

    Also average vim user: literally hours of reading tutorial pages on how to use vim.

    barsquid ,

    It is easy, though? I cannot even use it correctly. I just know some of the commands and that if you hold down shift it goes backwards.

    Voytrekk ,
    @Voytrekk@lemmy.world avatar

    I’m a vim user and I would say it’s not. It’s very powerful, but only once you become familiar with the commands.

    Nano is a better default for the average user because it works in a way most users would expect for a text editor to work.

    ysjet , (edited )

    Honestly, these days it’s pretty simple. The thing you need to remember is that you do not need to know EVERYTHING all at once. Learn a little bit, use it, keep what you use, discard what you don’t, get it in muscle memory, and learn a bit more. Very quickly you’ll be zooming through vim.

    You can learn the basics, and go from there- the basics of vim (which imo everyone should know- vi is often the fallback editor), and then you can just casually learn stuff as you go.

    Here’s the basics for modern default/standard vim: Arrow keys move you around like you expect in all ‘modes’ (there’s some arguments about if you should be using arrow keys in the vim community- for now, consider them a crutch that lets you learn other things). There’s two ‘modes’- command mode, and edit mode.

    Edit mode acts like a standard, traditional text editor, though a lot of your keybinds (e.g. ctrl-c/ctrl-v) don’t work.

    Press escape to go back into command mode (in command mode, esc does nothing- esc is always safe to use. If you get lost/trapped/are confused, just keep hitting escape and you’ll drop into command mode). You start vim in command mode. Press i to go into edit mode at your current cursor position.

    To exit vim entirely, go to command mode (esc), and type :wq<enter>.

    ‘:’ is ‘issue command string’,

    ‘w’ is ‘write’, aka save,

    ‘q’ is quit.

    In other words, ‘:wq’ is ‘save and quit’

    ‘:q’ is quit without saving, ‘:w’ is save and don’t quit. Logical.

    Depending on your terminal, you can probably select text with your mouse and have it be copied and then pasted with shift-ins in edit mode, which is a terminal thing and not a vim thing, because vim ties into it natively.

    That gets you started with basically all the same features as nano, except they work in a minimal environment and you can build them up to start taking advantage of command mode, which is where the power and speed of vim start coming into play.

    For example ‘i’ puts you in edit mode on the spot- capital i puts you in command mode at the beginning of the line. a is edit mode after your spot- capital A is edit mode at the end of the current line.

    Do you need these to use vim? Nope. Once you learn them, start using them, and have them as muscle memory, is it vastly faster to use? Yes. And there’s hundreds of keybinds like that, all of which are fairly logical once you know the logic behind them- ‘insert’ and ‘after’ for i/a, for example.

    Fair warning, vim is old enough that the logic may seem arcane sometimes- e.g. instead of ‘copy and paste’ vim has ‘yank and put,’ because copy/paste didn’t exist yet, so the keybinds for copy/paste are y and p.

    wise_pancake ,

    The second most important thing about vim to learn is:

    If nothing is behaving then you probably have caps lock on.

    s_s ,

    Vim makes it easy to edit text in complicated ways, once you’ve learned it.

    Vim is not easy to learn nor intuitive.

    It is simple and compounding.

    You might not ever edit enough text to ever need to learn a new skillset to edit text. If that’s the case, use nano.

    But if you do find yourself editing a lot of text, consider trying vimtutor.

    It takes 20 minutes and you’ll be proficient enough to match nano’s efficiency ceiling.

    Telorand ,

    Allow me to present to you my Ultimate Guide to Emacs.

    Opisek ,

    You can learn Emacs in one day. Every day.

    737 ,

    It’s extremely easy to get started

    geneva_convenience , (edited )
    @geneva_convenience@lemmy.ml avatar

    VIM is like drugs. Easy to start, hard to quit.

    callyral , to linux in How dare you use a text editor because it's easy to use
    @callyral@pawb.social avatar

    Vim is pretty easy for me because I’m used to it. Nano is very difficult to use for me because I’ve rarely used it.

    mihor ,
    @mihor@lemmy.ml avatar

    Same here, nano is the bane of my existence.

    tiredofsametab ,

    Opposite here. I got started with Gentoo back in the day of building things from the ground up. Their tutorials all used nano and I just got used to using that. I think when I had casually tried to mess with linux previously, old Mandrake and Redhat in the '90s, I always used the GUI editors, but I also didn't have a ton of time to mess with it and my hardware wasn't well-supported.

    notfromhere ,

    Same. Stage 1 install will forever be a core memory for me.

    Racle ,
    @Racle@sopuli.xyz avatar

    I was Nano user and I liked it. After I learned to use Vim, I liked it more. Now when I use nano it’s frustrating to use and I can do things much faster and easier in vim 😅

    GustavoM , to linux in How dare you use a text editor because it's easy to use
    @GustavoM@lemmy.world avatar

    Nano is my “daily drive”, but I’d use vim as well – takes a couple seconds to search for “how to type in linux vim” and “how to save a file in linux vim” anyways. :^)

    Rekhyt ,

    I know i and :wq and that’s all I ever plan on learning

    theshatterstone54 ,

    Not even Basic Command-Count-motion like c3w aka change 3 words after cursor, or d3b delete 3 words before the cursor?

    To that, you add the D aka delete command C for change Y for yank (copy)

    So yy to yank line, or dd to delete line.

    Also p for paste

    Also, i sends you before the cursor, a sends you after. Capital I is insert at beginning of line, Capital A is insert at end of line (append).

    I terms of motions and moving around, you need: hjkl, C-d and C-u (half page jumps down and up), and within the line: 0 or ^ for beginning of line, $ for end (taken from regex), w for moving by word forwards, b for moving by word backwards. That’s pretty much all you need imo. There is also t and f. Where t goes forwards (think 'till aka until). Like dtc delete until the c character. F is the same but goes backwards in the line rather than forwards. Remember you can use these with xommands, so d$ deletes until the end of the line. Or “dt.” deletes till the “.” so… yeahI know there’s more, but that’s all you need for Normal and Insert mode imo.

    For Visual mode, you only need to know how the Visual modes work. Visual (v), Visual Line (Shift-v) and Visual Block (Ctrl-V).

    Also, for visual mode, it might be helpful to learn how to use V-Block to comment out multiple lines at once. Can’t be bothered to go into it.

    But I’d argue that’s all there is to learn about vim keys in terms of getting work done.

    Rekhyt , (edited )

    Not gonna lie, once you’re getting past single button combos, I’m mentally checking out. Ctrl+K and Ctrl+U in nano are good enough for me, and if I need to do something more complex like actual coding, I’ll use an editor with a full GUI as well.

    theshatterstone54 ,

    Fair enough. I basically gave you a large chunk of vim so it will feel super overwhelming. The trick is to do one command or combo at a time. For example, I started with dd. Then I added yanking. Then I added visual mode. Then I added “o” (which I think I forgot to mention: o creates a newline under the current one and puts you in insert mode. Capital O does the same but above the current line). The real trick is going little by little. And to be honest, there are some commands I still rarely use or forget to mention. I’ve never used f instead of t. And in terms of forgetting to mention, there’s the x command which deletes the single character under the cursor rn.

    Also, I’m sure someone will find this list helpful, so on top of this, I’ll also add this video (and hope that Piped bot will appear): www.youtube.com/watch?v=RSlrxE21l_k

    It contains some things I haven’t mentioned.

    As for learning all this, I’m repeating myself for the third time. Do it little by little. And when a command is already a thing you do almost without thinking about it, you’re ready to add more.

    I’m mentally checking out

    Why? dw is delete word, c5b change 5 words backwards, and those are the most complicated commands you’ll ever get to use, unless you start adding cuatom keybinds.

    But I digress. If you don’t want to learn it, it’s fine.

    queue , to linux in How dare you use a text editor because it's easy to use
    @queue@lemmy.blahaj.zone avatar

    Nano isn’t even that simple. Ctrl+X to quit? I guess if you use phonetic sounds to figure out how to exit a program. At least Vim uses the idea of “use what the words start with.”

    I personally use micro in the terminal, and Kate if I want a GUI to write. Vim and Emacs are fine for those who want it, I have no stakes in the editor wars beyond “I just want my program to do what I want, and I want it to be simple to learn.”

    Doxin ,

    Nano has a cheat sheet at the bottom of the screen at all times

    queue ,
    @queue@lemmy.blahaj.zone avatar

    Meanwhile I can just use the same shortcuts every other program made in the last 40 years uses. Ctrl+Q to quit, Ctrl+S to save, Ctrl+Z for undo. If I wanted to consult a cheatsheet to relearn keyboard shortcuts, I’ll use vim and emacs.

    cravl ,

    To be fair, you can easily rebind all the keys to be more normal by adding a .nanorc. Though, Ctrl-Z conflicts with suspend in many terminals, so I keep that one as Ctrl-U. A .nanorc also allows turning on mouse support, changing the color scheme, etc.

    blazeknave , to linux in How dare you use a text editor because it's easy to use

    I spent the weekend failing to make my civ mods work, with a thousand lines of notes… 2/3 in, I think “damnit blazeknave. You spend months perfecting this stupid fucking obsidian setup, and you’ve been here in notepad+ like a fucking jabroni.”

    linearchaos ,
    @linearchaos@lemmy.world avatar

    I do the same all the time with anytype.

    I dropped notes into sublime and then go back and put them neatly into any type. I don’t really know why I do it either It takes any type a total of three or four seconds to start up and I have to enter in a passcode. But I only have to do it once. I guess I do have to think about where I’m going to put the document and making sure that it’s tagged correctly, it’s a lot easier just a scribble something into a random text window to forget about for a decade.

    blazeknave ,

    You mean my 6k Gmail drafts? 😭

    I started doing paper pads everywhere and trying to log at end of day.

    hjjanger , to linux in How dare you use a text editor because it's easy to use

    Emacs

    tastysnacks ,

    Hey now we don’t denigrate vim and nano users. For the nano users, denigrate means to put down.

    cerement ,
    @cerement@slrpnk.net avatar

    and sometimes you just need a text editor, not an entire thesaurus

    daniskarma , to linux in How dare you use a text editor because it's easy to use

    I’ll say that I find easier to exit vim that to exit nano.

    I don’t know what ^ means. I just start pressing special keys until it doesn’t the thing

    LodeMike ,

    CTRL

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lifeLocal
  • goranko
  • All magazines