Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Vim default configuration not loaded
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 112

PostPosted: Tue Aug 06, 2024 10:46 am    Post subject: Vim default configuration not loaded Reply with quote

Hello

In /etc/vim/vimrc there is a section of code that is like this

Code:

" We don't want VIM to load their own built-in defaults, preferring ours here
" instead. This option cannot apply to minimal builds, so it is guarded by a
" test that's guaranteed to fail for those, owing to the lack of +eval.
if 1
  let g:skip_defaults_vim = 1
endif


Does anybody know why?

I have been using vim via xterm, and I could move to a position with the mouse, and use the mouse scroll button to scroll text. Currently I can not. Is there a way to use mouse scroll in vim (in xterm)?

Regards
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2452

PostPosted: Tue Aug 06, 2024 11:05 am    Post subject: Re: Vim default configuration not loaded Reply with quote

rzdndr wrote:


I have been using vim via xterm, and I could move to a position with the mouse, and use the mouse scroll button to scroll text. Currently I can not. Is there a way to use mouse scroll in vim (in xterm)?



Strange, I can. Are you sure it's not a problem with your terminal?

Actually the scroll moves the cursor up and down for me. I'm using gnome-terminal.

Best Regards,
Georgi
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 112

PostPosted: Tue Aug 06, 2024 11:22 am    Post subject: Re: Vim default configuration not loaded Reply with quote

logrusx wrote:
rzdndr wrote:


I have been using vim via xterm, and I could move to a position with the mouse, and use the mouse scroll button to scroll text. Currently I can not. Is there a way to use mouse scroll in vim (in xterm)?



Strange, I can. Are you sure it's not a problem with your terminal?

Best Regards,
Georgi


I was not sure about my terminal.

It turns out that setting termName in ~/.Xresources to xterm-256Color will set the environment variable TERM. No need to change .bashrc and put checks if you are using on the console, or in X11.

~/.Xresources:

...
XTerm*termName:         xterm-256color
...


And setting mouse=a in your ~/.vimrc resolves the issue.

~/.vimrc:

...
set mouse=a
...


This let's you use the mouse to position the cursor, use the scroll button to scroll in the document, and select text.

Edit: Edited for a better solution

Thanks

Regards


Last edited by rzdndr on Tue Aug 06, 2024 12:06 pm; edited 2 times in total
Back to top
View user's profile Send private message
rzdndr
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2024
Posts: 112

PostPosted: Tue Aug 06, 2024 12:03 pm    Post subject: Re: Vim default configuration not loaded Reply with quote

logrusx wrote:
rzdndr wrote:


I have been using vim via xterm, and I could move to a position with the mouse, and use the mouse scroll button to scroll text. Currently I can not. Is there a way to use mouse scroll in vim (in xterm)?



Strange, I can. Are you sure it's not a problem with your terminal?

Actually the scroll moves the cursor up and down for me. I'm using gnome-terminal.

Best Regards,
Georgi


I am using good old xterm. For me the document is scrolled, not the cursor. But if you scroll more than one screen the cursor does move to stay on the screen.

Regards
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum