Bug 1190332 - Problem with "normal g`\"" in suse.vimrc in case g is already in use
Summary: Problem with "normal g`\"" in suse.vimrc in case g is already in use
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: All openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Ondřej Súkup
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-09 07:54 UTC by Dr. Werner Fink
Modified: 2022-03-16 13:32 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. Werner Fink 2021-09-09 07:54:20 UTC
I have received a bug report via mail from Enno Nagel:

<cite>
in der Datei /usr/share/vim/vim80/suse.vimrc (vormals /etc/vimrc) befindet
sich seit geraumer Zeit der autocmd

    autocmd BufReadPost *
      \ if line("'\"") > 0 && line("'\"") <= line("$")
      \           && expand("%") !~ "COMMIT_EDITMSG"
      \           && expand("%") !~ "ADD_EDIT.patch"
      \           && expand("%") !~ "addp-hunk-edit.diff"
      \           && expand("%") !~ "git-rebase-todo" |
      \   exe "normal g`\"" |
      \ endif

Der Befehl normal g` anstelle von normal! g` führt dabei dazu, dass jeder
Anweder, der g` durch n(ore)map anders bindet, eine Fehlermeldung beim Öffnen
jedes Buffers erhält.

Daher wäre es vorzuziehen, den autocmd nicht zu laden.
</cite>

it looks like Enno uses in its own ~/.vimrc a line with n(ore)map on g` which interferes with the autocmd in suse.vimrc

Shoudn't we use "normal! g`\""
Comment 1 Dr. Werner Fink 2021-09-09 08:05:08 UTC
Add OSC maintainer to CC