First,
Install vim with sudo apt-get install vim
.
Next, to color the syntax in the program (syntax highlight), do the following:
(1) Open the vimrc file (vim's configuration file) with the following command: The vim configuration file is the vimrc file in the home directory.
vim through /.vimrc
(2) Open file
syntax on
Add
(3) Enter normal mode (press Esc), enter :w
, save in Enter, and run the command as :source~/.vimrc
in normal mode and reload vimrc
I think the steps (1) to (3) will start coloring.
sudo apt-get install vim
How about
The apt-get
command to install Vim is
sudo apt-get install vim
But then the clipboard is not available yet.In addition,
sudo apt-get install vim-gtk
You can do it.See this question.
Edit ~/.vimrc
and add:
syntax on
The next time vim boots up, it will be colored.
Also, after adding colorscheme X
to .vimrc
, you can select a color scheme.For example,
color scheme eventing
You can find a list of color schemes in ls-l/usr/share/vim/vim__/colors
.(__
is the version number of the vim you installed.)
© 2024 OneMinuteCode. All rights reserved.