Opinions wanted - Vim or Nano

Pages: 12
ne555 wrote:
tmux...'ll give you tabs, splits and workspaces
I personally can’t stand all that stuff.

Anyway, I like ConEmu + Clink. (Which will also give you tabs and edit history and a few other things I have never explored.)
Last edited on
I am enjoying the POLITE discussion of editor options and other things, and learning a lot from it.

To everyone who has participated so far, I thank you. :)
Pedantically, in Linux:

cd

by itself will change to the home directory, no need for ~

tilde is handy for say :

cd ~/Downloads

My 1 cent for today :+)

I'm very used to MS-DOS keyboarding, so relearning all the *nix terminal commands is going to be interesting. Keeping the differences separate.
One thing I'm not sure anybody's mentioned yet is where to find help on commands and things in the terminals!

• For built-ins, e.g. bash's control flow and so forth, help lists them and e.g. help if for a particular one
• For usage, command --help or command -h
• For detailed usage, man command

Not all programs will follow the above guidelines, but almost all of them do.


Also, something you might like to play around with is "fish": https://fishshell.com/
It's a different terminal shell from "bash", which is usually the default. It's not compatible with bash, and makes a lot of different choices particular in how it does functions and control flow and so forth. Personally I love it due to the ease that you end up with a nice quick shell, and its autocompletion is brilliant ☺


(Also, I'm definitely one for the vim crowd, use it all the time — but it is definitely not something that's super easy to jump into. Needs a fair bit of time to get used!)
The bash being used in MSYS2 seems to be a crippled version. Neither command -h or man works.

After playing around with vim for a bit I agree, it is not something easily learned by a beginner.
closed account (2z0kLyTq)
Since people are talking about how they work on a Windows machine I thought I would share some of my preferences.

I don't use the MSYS2 terminal anymore -- I didn't like it. I installed Strawberry perl which has g++, gdb, and gmake in its bin directory. I then put the Strawberry perl bin directory in my path so I can call those programs from the command line. I've also installed 7zip which is a nice utility that works from the command line, and can be used for packing and unpacking tar files. I also installed GVim which I prefer it to working in the terminal.

I use perl instead of bash or bat files because I can write scripts on both my Linux and Windows machine and for all practical reasons have them work the same way on both machines. In fact one of the reasons I like perl is it makes a nice glue -- if you know what I mean.

--help works just fine on the windows command line with the following programs: g++, gmake, gdb, vim, and 7z, provided that they are in your path.

The sole reason why I installed the MSYS2 distro in the first place:

https://solarianprogrammer.com/2019/11/16/install-codeblocks-gcc-windows-build-c-cpp-fortran-programs/

Trying to get Code::Blocks to use a newer compiler than what ships with the setup from 2 years ago.

The article recommends getting MSYS2 and using that GCC core in C::B.

Since MSYS2 has a terminal as part of the package I thought I'd try it out. Including both of the editors another article mentions are available:

https://solarianprogrammer.com/2019/11/05/install-gcc-windows/

Another distro I've had installed for several years, https://nuwen.net/mingw.html

The limited amount of time I've spend playing around with this other distro shows it is more Windows friendly than MSYS2.

I haven't really used either distro for more than a hour or so. Something about doing command-line I find "offputting" compared to using a GUI IDE.

I am making an effort now to overcome my reluctance and actually take time to learn how.
I know that by now the thread has gone off-topic, but I will do my best to answer the OP:

Furry Guy
I noticed while following the install instructions the site mentioned there are a couple of terminal editors available. Vim and Nano.

OK, which editor do you people suggest I use. I downloaded both, dinked around for a couple of minutes with each, but want some feedback from experienced people.

Historically opinions of which X is 'better' have resulted in many a Holy War. ( http://www.catb.org/jargon/html/H/holy-wars.html )
Vim and Nano both have their partisans, and each one has both different and similar features.

Generally speaking, I recommend you use whatever works for you, or whatever you're most confortable with. If the tool you are using is sufficient to complete the task at hand and you understand it well enough to use it, then it seems most reasonable to use it.
The Religious Wars didn't happen, and I noted that this was a very POLITE discussion of editors a month ago.

I very specifically wanted and asked for opinions from people who had extensive experience with the editors, that could be seen alongside my experience of using both (or more) terminal editors.

Left to my druthers I would not have even TRIED to use a terminal editor, or consider trying command-line compilation.

From the stand-point of someone who is a "for fun" hobbyist programmer still learning I'd stick with an IDE (Code::Blocks and Visual Studio incidentally) and not bother with going outside my "comfort zone."

I chose and still choose to expand my horizons, challenge myself and my limited perceptions. Make my brain hurt from over-exerting myself.

This whole luau started because I wanted a more up-to-date compiler for C::B than the one that is bundled with the current version installer dated December 2017.

As a result of my curiosity, here and other threads, I've learned that VS can utilize command-line compilation and make files. So I'm not stuck with *nix terminal ways of doing things.

I'm an old MS-DOS keyboard warrior from WAAAAAY back, so am very comfortable (other than fighting arthritis) with typing my way around a command prompt. Even if it is a Developer's Command Prompt usable with VS.
> where to find help on commands and things in the terminals!
there is also info (may want to pass --vi-keys for sanity)

and from inside vim you may do :Man program to open the manpage of program (you may also prepend tab or vertical, so :tab Man scanf will open the manpage in another tab)
also, in normal mode you may press K (uppercase k) and it will give you the man page of the word under the cursor
where to find help on commands and things in the terminals!

google. For both windows and unix you can get working examples of common commands immediately without having to wade through 87 flags and options to unravel the exact thing you want to do. Grep is a good example of this... I can read the manual for 20 min or I can google "what files contain string grep" to see that all I wanted was grep -i -nl whatfiles -e 'whattext'. The manuals are exhaustive, and great resources, but someone else already been there, done that, and stuck it on the web to share it.

These command line tools for programmers are very similar across win and unix.
program > file //redirects the cout/console IO of program to the file, overwrites.
program >> file // redirects IO to file, appends to existing file
program < file //redirects file to program as if typed by keyboard, to run your tests that have lots of user typing over and over.

I advise learning the basics, including simple batch and shell scripts. these are priceless tools to any programmer.
Last edited on
Topic archived. No new replies allowed.
Pages: 12