Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


vim or nano? - Page 3
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

vim or nano?

135

Comments

  • I kinda lazy, so I use Emacs with tramp-mode and do C-x C-f /ssh: which include dired for file manager and M-x shell for shell

  • WebProjectWebProject Host Rep, Veteran

    @jwg29859 said:
    Vi for Linux and Notepad for Windows. :)

    Notepad is great as for the Notepad++ is better!

  • angstromangstrom Moderator
    edited November 2022

    @borales said:
    Nano is easier but Vim is more powerful.
    Are you a vi/vim or a nano guy?

    The better comparison is between nano and vi (vi ≠ Vim)

    Most Linux distributions have nano and vi (but not Vim) installed by default

    BSD distributions have vi (but not Vim or nano) installed by default

    In the past, Vim was often compared with Emacs

    Thanked by 1emg
  • emgemg Veteran

    I'll whine a little:

    macOS comes with TextEdit, which is Apple's version of Notepad. The default setting is Rich Text Format, which includes formatting options like font selection, size, bold, italic, etc. The Save menu offers "rich" file formats, but plain text is nowhere to be found.

    Under the Format menu in TextEdit, you will find a menu item that toggles between "Make Plain Text" and "Make Rich Text". The formatting options in the toolbar on the window are hidden or exposed accordingly, and the Save menu format options change completely.

    The problem comes when you are facing the Save dialog box and trying to figure out how to save your document as plain text. It isn't intuitive or obvious that the solution is to back out and close the Save dialog box and go to the Format menu to toggle the menu option.

    By the way, if you are in Plain Text mode, you can still choose formatting options like bold or font size from the menus, even though the toolbar is hidden. The formatted text appearance changes on the screen (e.g., bold, font size, etc.), but the formatting is lost when you reload the saved file later.

    As far as I am concerned, this non-intuitive user interface design sucks, especially if you are new to macOS and just need to save a plain text file, such as copy/pasting a public/private key pair or editing a "known_hosts" file on your Mac.

    Thanked by 1angstrom
  • beer or wine ?

  • @emg said: As far as I am concerned, this non-intuitive user interface design sucks, especially if you are new to macOS and just need to save a plain text file, such as copy/pasting a public/private key pair or editing a "known_hosts" file on your Mac.

    I completely agree

    I think that TextEdit is more comparable to WordPad on Windows than it is to Notepad, because the latter is (simply) a plain text editor

  • vim, many years-worth of muscle memory.

  • boralesborales Member
    edited November 2022

    @angstrom said:

    (vi ≠ Vim)

    Well they are not completely different. From Google:

    Vi stands for Visual. It is a text editor that is an early attempt to a visual text editor.

    Vim stands for Vi IMproved. It is an implementation of the Vi standard with many additions. It is the most commonly used implementation of the standard. Most Linux distributions come with Vim already installed

    Vim is an enhanced version of the vi editor written and maintained by Bram Moolenaar. Vim commands and their syntax are fully compatible with vi.

  • emgemg Veteran
    edited November 2022

    @cold said:
    beer or wine ?

    Beer for the vi crowd. Wine pairs well with nano. :-)

    Thanked by 1cold
  • @borales said:

    @angstrom said:

    (vi ≠ Vim)

    Well they are not completely different. From Google:

    Of course, from the statement "vi ≠ Vim" it doesn't follow that vi and Vim are completely different either. (I'm well aware of the relation between the two editors)

    My point was simply that the better comparison for nano is vi and not Vim

  • emgemg Veteran

    @angstrom said:

    I completely agree

    I think that TextEdit is more comparable to WordPad on Windows than it is to Notepad, because the latter is (simply) a plain text editor

    Point taken. An alternate view is that Apple has the equivalent of two Windows applications in its TextEdit program: Notepad and Wordpad. You switch between the two applications with TextEdit's Format menu toggle. Yuck!

  • @emg said:

    @angstrom said:

    I completely agree

    I think that TextEdit is more comparable to WordPad on Windows than it is to Notepad, because the latter is (simply) a plain text editor

    Point taken. An alternate view is that Apple has the equivalent of two Windows applications in its TextEdit program: Notepad and Wordpad. You switch between the two applications with TextEdit's Format menu toggle. Yuck!

    Yuck indeed

    Just curious: I'm not a Mac user, but if you open a terminal, isn't vi available? And perhaps nano as well?

  • Neo(vim) >>>>>

    If I use another editor/IDE, I typically install vim plugins. I even use a vim-plugin for Firefox.

  • @LTniger said:
    real man just edit file in hex mode with xxd.

    Real men speak to the metal in machine code :D

  • Always nano,

  • emgemg Veteran

    @angstrom said:

    Yuck indeed

    Just curious: I'm not a Mac user, but if you open a terminal, isn't vi available? And perhaps nano as well?

    That is a good question.

    You will find vi, vim, and nano included by default in /usr/bin/ on macOS. macOS is a version of UNIX, by the way.

    macOS used to include emacs too. The latest versions of macOS includes mg instead of emacs. The change happened in macOS 10.15 Catalina, probably to avoid GNU licensing encumbrances. They changed the default shell in Terminal from bash to zsh at the same time, probably for the same reason.

    Sadly, I had to open a Terminal window to check for myself. I have been using BBEdit for so long that I did not know which editing tools were made available by default. I launch BBEdit from the command line, too.

    Thanked by 1angstrom
  • @emg said: macOS used to include emacs too. The latest versions of macOS includes mg instead of emacs. The change happened in macOS 10.15 Catalina, probably to avoid GNU licensing encumbrances. They changed the default shell in Terminal from bash to zsh at the same time, probably for the same reason.

    It may have to do with specifically version 3 of the GPL rather than with the GPL per se

    Or perhaps it's for another reason

    By the way, what does nano --version show? (Assuming the version of nano that is installed by default on macOS)

  • nano only and only

  • The first command to send after confirming that the server OS installation is complete
    apt purge nano

  • emgemg Veteran

    @angstrom said:

    It may have to do with specifically version 3 of the GPL rather than with the GPL per se

    Or perhaps it's for another reason

    By the way, what does nano --version show? (Assuming the version of nano that is installed by default on macOS)

    Yes, it was the change of those products from GPLv2 to GPLv3. As far as I know, Apple has not made any public statement confirming it, but it is a common assumption.

    By the way, I used the "which" command to see available editors. I should have gone to the /usr/bin directory and looked. It turns out that vi is a link to vim on all versions of macOS that I looked at:

    $ ls -l vi
    lrwxr-xr-x  1 root  wheel  3 Apr 27  2013 vi -> vim
    

    In addition, I learned that nano changed, too. I have a feeling that you suspected it all along.

    Here are older macOS versions, probably all the versions that preceded macOS 10.15 Catalina:

    $ ls -l nano
    -rwxr-xr-x  1 root  wheel  324320 May 18  2009 nano
    $ ls -l pico
    lrwxr-xr-x  1 root  wheel  4 Apr 27  2013 pico -> nano
    $ nano --version
     GNU nano version 2.0.6 (compiled 11:42:28, May 18 2009)
     Email: [email protected]    Web: http://www.nano-editor.org/
     Compiled options: --disable-nls --enable-color --enable-extra --enable-multibuffer --enable-nanorc
    $ pico -version
    Requested fill size "sion" is invalid
    

    Here are newer macOS versions, probably macOS 10.15 Catalina and up. Note the incorrect nano syntax used in the third command:

    % ls -l nano
    lrwxr-xr-x  1 root  wheel  4 Oct 12 23:06 nano -> pico
    % ls -l pico
    -rwxr-xr-x  1 root  wheel  1474144 Oct 12 23:06 pico
    % nano -version
    Pico 5.09
    % pico -version
    Pico 5.09
    

    In newer versions of macOS, the command "nano --version" launches pico with an empty filename. The "--version" part of the command appears to be ignored.

    The examples here were taken from Mac OS X 10.6.8 Snow Leopard Server and macOS 12.6.1 Monterey.

    Thanked by 1angstrom
  • nano - good syntax highlighting / cut & pasting is easy - for working on a lot of files - vscode

  • @emg said:

    @angstrom said:

    It may have to do with specifically version 3 of the GPL rather than with the GPL per se

    Or perhaps it's for another reason

    By the way, what does nano --version show? (Assuming the version of nano that is installed by default on macOS)

    Yes, it was the change of those products from GPLv2 to GPLv3. As far as I know, Apple has not made any public statement confirming it, but it is a common assumption.

    By the way, I used the "which" command to see available editors. I should have gone to the /usr/bin directory and looked. It turns out that vi is a link to vim on all versions of macOS that I looked at:

    $ ls -l vi
    lrwxr-xr-x  1 root  wheel  3 Apr 27  2013 vi -> vim
    

    Although I didn't ask about vi/im, I suspected that vi was a link to vim

    In addition, I learned that nano changed, too. I have a feeling that you suspected it all along.

    Here are older macOS versions, probably all the versions that preceded macOS 10.15 Catalina:

    $ ls -l nano
    -rwxr-xr-x  1 root  wheel  324320 May 18  2009 nano
    $ ls -l pico
    lrwxr-xr-x  1 root  wheel  4 Apr 27  2013 pico -> nano
    $ nano --version
     GNU nano version 2.0.6 (compiled 11:42:28, May 18 2009)
     Email: [email protected]  Web: http://www.nano-editor.org/
     Compiled options: --disable-nls --enable-color --enable-extra --enable-multibuffer --enable-nanorc
    $ pico -version
    Requested fill size "sion" is invalid
    

    Right: nano-2.0.6 was the last version of nano licensed under GPLv2

    Here are newer macOS versions, probably macOS 10.15 Catalina and up. Note the incorrect nano syntax used in the third command:

    % ls -l nano
    lrwxr-xr-x  1 root  wheel  4 Oct 12 23:06 nano -> pico
    % ls -l pico
    -rwxr-xr-x  1 root  wheel  1474144 Oct 12 23:06 pico
    % nano -version
    Pico 5.09
    % pico -version
    Pico 5.09
    

    In newer versions of macOS, the command "nano --version" launches pico with an empty filename. The "--version" part of the command appears to be ignored.

    The examples here were taken from Mac OS X 10.6.8 Snow Leopard Server and macOS 12.6.1 Monterey.

    Okay, so at some point, Apple decided that nano-2.0.6 was too old, which was sensible, since it dated from 2006. They decided to use pico instead, linking nano to pico, which is kind of amusing because pico-5.09 is pretty old as well (but not quite as old as nano-2.0.6, as far as I can tell)

    Thanked by 1emg
  • @jwg29859 said:
    Vi for Linux and Notepad for Windows. :)

    Not even notepad++ in Windows?

    Thanked by 1BingoBongo
  • You don't need to RTFM to use nano.

    Thanked by 2angstrom pedagang
  • Always prefer Vim.

  • @TimboJones said:

    @jwg29859 said:
    Vi for Linux and Notepad for Windows. :)

    Not even notepad++ in Windows?

    @TimboJones said:

    @jwg29859 said:
    Vi for Linux and Notepad for Windows. :)

    Not even notepad++ in Windows?

    Simply because it is not installed by default.

  • @jwg29859 said:

    @TimboJones said:

    @jwg29859 said:
    Vi for Linux and Notepad for Windows. :)

    Not even notepad++ in Windows?

    @TimboJones said:

    @jwg29859 said:
    Vi for Linux and Notepad for Windows. :)

    Not even notepad++ in Windows?

    Simply because it is not installed by default.

    Step 1 of any new Windows install is hitting up ninite.com.

  • Nano for sure. Easy, simple and enough for what we want.

    Why wasting time with vi / vim? Just because you use Vi / vim doesn't mean that you are the pro. Like nano doesn't mean that you are better than vi / vim user.

    That is a shitty. Use what you like. In my own vision nano or vim should be good for who have time and don't care to waste a little time spending in vi or vim.

    This is like the same example of cars drivers, because you have a Ferrari doesn't mean that you become a good driver did you?

    The same for nano or vim. Use what you prefer and that's.

  • nvi, I don't like colors and automatic syntax.

  • I use awk and sed to edit my files anything else is for pussies

Sign In or Register to comment.