source /etc/vim/myscript.vim in /etc/vim/vimrc/etc/vim/myscript.vimsource /etc/vim/myscript.vim in /etc/vim/vimrcmyscript.vim from /etc/vim~/.vimrc and add the line source ~/.vim/myscript.vimHere is the code
let s:comMapNoShebang = { \ 'c': {'b': '/*', 'm': '**', 'e': '*/'}, \ 'cpp': {'b': '//', 'm': '//', 'e': '//'}, \ 'make': {'b': '##', 'm': '##', 'e': '##'}, \ 'java': {'b': '//', 'm': '//', 'e': '//'}, \ 'latex': {'b': '%%', 'm': '%%', 'e': '%%'}, \ 'html': {'b': '<!--', 'm': ' --', 'e': '-->'}, \ 'lisp': {'b': ';;', 'm': ';;', 'e': ';;'}, \ 'css': {'b': '/*', 'm': '**', 'e': '*/'}, \ 'pov': {'b': '//', 'm': '//', 'e': '//'}, \ 'pascal': {'b': '{ ', 'm': ' ', 'e': '}'}, \ 'haskell': {'b': '{-', 'm': '-- ', 'e': '-}'}, \ 'vim': {'b': '""', 'm': '"" ', 'e': '""'}, \}
I do not understand why if the script is loaded by /etc/vim/vimrc it tells me:
Error detected while processing /etc/vim/epitech.vim:
line 35:
E15: Invalid expression: {
line 36:
E10: \ should be followed by /, ? or &
line 37:
E10: \ should be followed by /, ? or &
line 38:
E10: \ should be followed by /, ? or &
line 39:
E10: \ should be followed by /, ? or &
line 40:
E10: \ should be followed by /, ? or &
line 41:
E10: \ should be followed by /, ? or &
line 42:
E10: \ should be followed by /, ? or &
line 43:
E10: \ should be followed by /, ? or &
line 44:
E10: \ should be followed by /, ? or &
line 45:
E10: \ should be followed by /, ? or &
line 46:
E10: \ should be followed by /, ? or &
line 47:
E10: \ should be followed by /, ? or &
line 48:
E10: \ should be followed by /, ? or &
line 50:
E15: Invalid expression: {
line 51:
E10: \ should be followed by /, ? or &
line 52:
E10: \ should be followed by /, ? or &
line 53:
E10: \ should be followed by /, ? or &
line 54:
E10: \ should be followed by /, ? or &
line 55:
E10: \ should be followed by /, ? or &
line 56:
E10: \ should be followed by /, ? or &
line 57:
E10: \ should be followed by /, ? or &
line 58:
E10: \ should be followed by /, ? or &
line 59:
E10: \ should be followed by /, ? or &
Press ENTER or type command to continue
But works like a charm in .vimrc
I actually need this script for system wide installation
VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 15 2020 06:40:31) Included patches: 1-2269 Modified by team...@tracker.debian.org Compiled by team...@tracker.debian.org
Operating System: Ubuntu20.04 LTS
Terminal: Default Gnome Terminal
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Steps to reproduce
- Add
source /etc/vim/myscript.vimin/etc/vim/vimrc- Put my script at
/etc/vim/myscript.vim- Tells me that the dictionary has invalid syntax (See Expected Behaviour)
- Remove the line in
source /etc/vim/myscript.vimin/etc/vim/vimrc- Remove
myscript.vimfrom/etc/vim- Create a
~/.vimrcand add the linesource ~/.vim/myscript.vim
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #11475 as completed.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()
closing then.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you commented.![]()