LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   VIM - Visual Mode problem (https://www.linuxquestions.org/questions/linux-software-2/vim-visual-mode-problem-896240/)

daghenningsorbo 08-08-2011 02:46 PM

VIM - Visual Mode problem
 
Hi,
this problem only occurs in Vim (not GVim).

When pressing v (aka entering visual mode) it doesn't enter visual mode. But the second press of v starts it, but then visual mode behaves weird.

The <Leader> is not recognized, so my mappings doesn't work. This happens even when starting vim with "vim -u NONE".

Does anyone have a clue about what might be wrong?


Regards,
dagH

corp769 08-08-2011 03:30 PM

Hello,

What distribution are you using? It seems as when you open up vim, you are using the original vim modes; You most likely need to install the vim-common and vim-enhanced packages, along with the dependencies that normally come with it.

If you are using ubuntu, enter the following on the command line:
Code:

sudo apt-get install vim
Cheers,

Josh

daghenningsorbo 08-08-2011 04:13 PM

Well, I have all that installed, so it can't be the reason.

I thought that it might be problems in my vimrc file, but the problem was still there even when I ran vim without the vimrc file.

Any other clue?

PS: using Ubuntu 10.04

corp769 08-08-2011 04:23 PM

Can you post what is outputted when you ran the above command? I know it sounds silly, but when I was at my friends house a while back, he had a similar problem, and he needed to install more packages than he realized.

daghenningsorbo 08-08-2011 04:31 PM

I didn't run it because it was already installed, but my installed vim packages are these:

Code:

~$ dpkg --get-selections | grep vim
vim                                            install
vim-common                                      install
vim-doc                                        install
vim-gnome                                      install
vim-gui-common                                  install
vim-runtime                                    install
vim-tiny                                        install

out of possible:

Code:

~$ apt-cache search vim | grep vim
vim - Vi IMproved - enhanced vi editor
vim-common - Vi IMproved - Common files
vim-dbg - Vi IMproved - enhanced vi editor (debugging symbols)
vim-doc - Vi IMproved - HTML documentation
vim-gnome - Vi IMproved - enhanced vi editor - with GNOME2 GUI
vim-gui-common - Vi IMproved - Common GUI files
vim-runtime - Vi IMproved - Runtime files
vim-tiny - Vi IMproved - enhanced vi editor - compact version
jvim-canna - Japanized VIM (Canna version)
jvim-doc - Documentation for jvim (Japanized VIM)
libtext-vimcolor-perl - syntax color text in HTML or XML using Vim
libvi-quickfix-perl - Perl support for vim's QuickFix mode
vim-addon-manager - manager of addons for the Vim editor
vim-gtk - Vi IMproved - enhanced vi editor - with GTK2 GUI
vim-latexsuite - view, edit and compile LaTeX documents from within Vim
vim-nox - Vi IMproved - enhanced vi editor
vim-rails - plugins for vim to allow easier editing of Rails Applications
vim-scripts - plugins for vim, adding bells and whistles
vim-syntax-gtk - Syntax files to highlight GTK+ keywords in vim
vim-vimoutliner - script for building an outline editor on top of Vim
vimhelp-de - Vi IMproved - Documentation files (German translation)
vim-puppet - Vim syntax highlighting for puppet manifests

But I don't think this is the problem, but hey, maybe it is :)

corp769 08-08-2011 04:34 PM

I'm about to leave for work dude, but for the hell of it, try removing vim-tiny for the time being, along with messing with the other packages. I know it's a simple fix, but I don't time until now plus 12-13 hours.....

Hope you find a fix while I'm gone!

-Josh

daghenningsorbo 08-08-2011 04:49 PM

Hey man, thanks!

...even if the problem wasn't vim-tiny, but your suggestion pointed me in the right direction. The problem was the binary vim.gnome which /usr/bin/vim linked to. When I started /usr/bin/vim.basic, then problem disappeared right away :)

So thanks for leading be in the right direction :)


All times are GMT -5. The time now is 06:29 AM.