as the title. how to learn vi, bash, and i just cannot open vim. and ... what is ex in vi.

Dani AI

Generated

A short, practical supplement to the thread that ties together ’s points and ’s questions.

vi, Vim and ex — quick context. vi is the original visual editor; Vim (Vi IMproved) is a superset with many extra features. ex is the line-based editor / command language that sits under vi/Vim — the colon-style commands are ex commands and ex can be invoked directly on Unix systems. Many modern installs ship a minimal vi (or a busybox/vim-tiny build) while the full Vim binary is supplied by the distro package named things like vim or vim-enhanced.

Troubleshooting why “vim” won’t start. Confirm what’s present with a simple binary check:

command -v vim || command -v vi

vim --version or vi --version shows which build is installed. If a minimal build is present, install the full Vim package for the distribution (package name varies). Also note that a usable vi is almost always available even on stripped-down systems.

A short, effective learning path. Start with the shipped interactive tutor:

vimtutor

Use the editor’s built-in help and the shell manual (man vim, man bash). Practice a handful of concrete tasks: fast navigation, search-and-replace, recording/replaying a macro, and simple text-processing scripts. For Bash scripting, learn quoting, redirection, conditionals/loops, and use set -x during debugging and the shellcheck linter to catch common mistakes.

About mouse/drag and GUI convenience. For a GUI experience use gVim; for terminal Vim enable mouse support by adding set mouse=a to ~/.vimrc (note: this changes terminal selection behavior and may need extra config for tmux/screen). It’s normal to prefer a graphical editor for casual work — Vim’s main advantage is ubiquity and power when working remotely or automating edits.

Recommended Answers

All 3 Replies

you probably don't have vim, as this is an extension of Vi (although essentially it is the same thing). try this to get vim (if you're using debian os):

sudo apt-get install vim

I have a great , but it will take practice to learn how to use it effectively.

Here are some of my most used commands for vi/vim:

i - enter input mode
esc - escape input mode
del - delete text
:q - quit
:wq - write and quit
:q! - quit without saving
dd - deletes a whole line
shift+a - goes to the end of a line and enter input mode

As for the ex command, I'm not sure what that does without being able to test it.

Thank you...But after I have used vi for sometime, I still find it not as convenient as most graphical editors, isn't it? Especially there is no drag to us in vi.

Yes you're correct. A lot of old school programmers love vi, and that's all I use in work. It's because we use Subversion for version control, and it's good to keep everyone using the same editor for consistencies in the team.

If I was working alone, then I'd most likely use a graphical editor like gedit.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.