DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I have vim 7.0-122+1. This version doesn't have syntax highlighting (when I try to enable it the program tells me that 'command is not available in thi version'). What should I do to enable it? What packages remove or install from my Linux? I use Debian etch.
...tells me that 'command is not available in thi version'
What 'command' are you trying to use?
There are lots of ways to turn it on including commands, but the easiest thing is probably to find the line in /usr/share/vim/vimrc that says " syntax on, and remove the comment symbol (")
type ':script' to see what all scripts it's loading, and then check any of those for anything odd.
Especially make sure that any needed dependencies are loaded. For example, the .vim files under .../syntax/ directory. As to which ones are needed for what, I couldn't really tell you. It seems like my vim has always loaded all the appropriate scripts, on it's own, just fine. Anyway, that gives you something to check out and investigate.
If that doesn't help, then the next thing you could do is 'vim --version'. This will give alot of information about the modules and options your vim was compiled with.
This may be a stupid question, but are you naming the file with the proper extension? AFAIK, vim doesn't know how to properly highlight, until the file being worked on, has a filename extension that it is familiar with. That is also providing that the necessary script(s) have been loaded up, which is one of the reasons I make mention of looking at the output of ':script'.
Hi,
I have vim 7.0-122+1. This version doesn't have syntax highlighting (when I try to enable it the program tells me that 'command is not available in thi version'). What should I do to enable it? What packages remove or install from my Linux? I use Debian etch.
Create a ~/.vimrc file with the syntax on like in my file below.
Code:
>$ cat .vimrc
" Syntax highlighting all the time set this to avoid editing the
" " /etc/vim/vimrc after an upgrade the file usually gets overwritten.
syntax on
"
" " Use F12 to switch to insert mode without the stair-step effect.
set pastetoggle=<F12>
Also here is what I have installed for vim related packages.
Code:
>$ COLUMNS=125 dpkg -l | grep vim
ii vim 7.0-122+1 Vi IMproved - enhanced vi editor
ii vim-common 7.0-122+1 Vi IMproved - Common files
ii vim-doc 7.0-122+1 Vi IMproved - HTML documentation
ii vim-runtime 7.0-122+1 Vi IMproved - Runtime files
ii vim-scripts 7-3 plugins for vim, adding bells and whistles
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.