SlackwareThis Forum is for the discussion of Slackware 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.
I think there was an upgrade of vim.
If i search
/searchterm
and try to go to the next result with n
the searchterm either changes or goes back to a different searchterm
I tried to
mv .vimrc vimrc_backup
cp /usr/share/vim/vimrc .vimrc
use vimrc from a different distro installation
and what not, but the problems with search stay.
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2016 Jul 28
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Get the defaults that most users want.
"source $VIMRUNTIME/defaults.vim
"if has("vms")
" set nobackup " do not keep a backup file, use versions instead
"else
" set backup " keep a backup file (restore to previous version)
" if has('persistent_undo')
" set undofile " keep an undo file (undo changes after closing)
" endif
"endif
set nobackup
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set tw=80
set shiftwidth=2
set softtabstop=2
set expandtab
set nohlsearch
"if &t_Co > 2 || has("gui_running")
" Switch on highlighting the last used search pattern.
" set hlsearch
"endif
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Put these in an autocmd group, so that we can delete them easily.
augroup vimrcEx
au!
" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
augroup END
else
set autoindent " always set autoindenting on
endif " has("autocmd")
" Make vim work with the 'crontab -e' command
set backupskip+=/var/spool/cron/*
" Add optional packages.
"
" The matchit plugin makes the % command work better, but it is not backwards
" compatible.
if has('syntax') && has('eval')
packadd matchit
endif
Assuming you're running Slackware 14.2, the last update of vim was Wed Jun 15 01:57:05 UTC 2016. So something changed besides vim itself.
Just run "vim --version" if you want to check your version (and compile date). Or just do a Ctrl+F on the changelog
Have you recently made changes to ~/.inputrc perhaps?
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 10 2017 12:19:49)
I didn't recently edit inputrc
I now suddenly works again. I got no idea why.
For two hours i replaced vimrc (from backups), used the systemd defaults ones and what not.
Figured out that root's vim still work, copied that, didn't work.
deleted .viminfo, tried "vi" and "vim" (though vi is aliased to vim) etc. etc.
Suddenly it works again and i got no idea why.
I still don't understand the meaning of all the vimrc files which i listed above.
Which one is the one i care for ?
(on debian there is /etc/vim/vimrc, or similar, on Slackware it doesn't seem to exist per default, but lots of vimrc at all kind of places)
So it looks like you're either running Slackware -Current (not 14.2) or you've installed a vim that does not belong in 14.2.
As for your vimrc files and etc. sorry, I can't help. I use vi (/usr/bin/vi: symbolic link to elvis)
Yes, it is current
(not that i would have wanted it, but made an error when editing the "mirros" file and then simply sticked to it, as i was not sure if i could undo that).
The questions about vimrc can be answered by you, i guess. What is:
vimrc.new
for example?
If you mean /usr/share/vim/vimrc.new, that's the new version of /usr/share/vim/vimrc which should be manually overwritten or merged with the old vimrc. It's probably the only .new file that's not handled by slackpkg. I think slackpkg only looks for .new files in /etc.
I run -stable, but at one point I compiled vim 8 from the -current SlackBuild and upgraded with that. I can't remember if I had that same problem as you, but I know I ran into other quirks or bugs. For example, certain settings would take effect if I entered them interactively, but not if I put them in vimrc, while others would work fine either way. I also tried with a fresh vimrc.
So my advice would be to stick with the version of vim from -stable, at least until the next time it is upgraded. If you are running -current, you can get the SlackBuild from the source/ directory of your DVD or a mirror and use that to build it.
Like said: After two hours of trying everything which came to my mind,
the problem vanished just like it occured: Out of the blue.
I do recall that i had that problem before. Iirc i set an alias from vi to vim and/or copied the vimrc from debian to ~/.vimrc
Main problem is that doing search and then going through the results is in muscle memory. If it doesn't work, i can't even say for sure which keyboard-shortcut i use.
Well: i did know what the last searchterm was, because after typing "esc + n" it always went back to the last searchterm, instead of showing the next result of the actual searchterm.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.