python syntax highlighting

86 views
Skip to first unread message

Mathieu Roux

unread,
Nov 9, 2020, 9:21:35 AM11/9/20
to vim...@googlegroups.com
Hello everybody,

I have re-installed my computer recently with kubuntu.
Now, when i use vim (python program with syntax highlighting), it
appears "S>" in the margin of my text (on the left).

I just don't know why some lines are marked "S>" and some other lines
are not marked.
And then maybe i should disable this mark, but i don't know how.

Thanks,
Mathieu

Christian Brabandt

unread,
Nov 9, 2020, 11:06:29 AM11/9/20
to vim...@googlegroups.com
Have you installed a linter or some kind of a syntax checking plugin?
Something like ale or neomake or syntastic? If so, please check the
documentation of that plugin.

Best,
Christian
--
Christi Niederlage war nicht die Kreuzigung, sondern der Vatikan.
-- Jean Cocteau

Mathieu Roux

unread,
Nov 9, 2020, 12:53:31 PM11/9/20
to vim...@googlegroups.com
nothing like that...

i customized my .vimrc:

syntax on
syntax enable
let filetype_py = "python"
au FileType python nmap œ :w<CR>:!clear ; python3.9 "%"<CR>
au FileType python imap œ <esc>:w<CR>:!clear ; python3.9 "%"<CR>

When i execute my program with "œ", after that, there is always one
error in red in the bottom of the window.
"E:[1(#1)]"
and it seems that the error is also indicated by "S>" in red in the
margin...

With a C langage program (with customization), i don't have the same
problem.
> --

Christian Brabandt

unread,
Nov 9, 2020, 12:59:04 PM11/9/20
to vim...@googlegroups.com

On Mo, 09 Nov 2020, Mathieu Roux wrote:

> nothing like that...
>
> i customized my .vimrc:
>
> syntax on
> syntax enable
> let filetype_py = "python"
> au FileType python nmap œ :w<CR>:!clear ; python3.9 "%"<CR>
> au FileType python imap œ <esc>:w<CR>:!clear ; python3.9 "%"<CR>
>
> When i execute my program with "œ", after that, there is always one
> error in red in the bottom of the window.
> "E:[1(#1)]"

That looks like the error comes from syntastic and is also displayed in
your statusline by vim-airline.

Are you sure you haven't installed any plugins? My guess you have at
least syntastic and vim-airline installed. Can you show the output of
`:scriptnames`?

Best,
Christian
--
Eine Betriebsanalyse ist eine kostspielige Methode, durch
betriebsfremde Fachleute das ermitteln zu lassen, was man im Betrieb
seit 20 Jahren weiß.
-- Michael Schiff

Mathieu Roux

unread,
Nov 13, 2020, 5:06:28 PM11/13/20
to vim...@googlegroups.com
Hello,

In fact, i have just installed all my stuff on a new computer.

I did not installed consciently syntastic or vim-airline, but maybe i
use it and i don't know.

Bellow is my :scriptnames.

Do you want one screenshot of my vim's window?






1: /usr/share/vim/vimrc
2: /usr/share/vim/vim81/debian.vim
3: /usr/share/vim/vim81/syntax/syntax.vim
4: /usr/share/vim/vim81/syntax/synload.vim
5: /usr/share/vim/vim81/syntax/syncolor.vim
6: /usr/share/vim/vim81/filetype.vim
7: /var/lib/vim/addons/ftdetect/UltiSnips.vim
8: /var/lib/vim/addons/ftdetect/bitbake.vim
9: /var/lib/vim/addons/ftdetect/fugitive.vim
10: /var/lib/vim/addons/ftdetect/snippets.vim
11: ~/.vimrc
12: /usr/share/vim/vim81/syntax/nosyntax.vim
13: /usr/share/vim/vim81/ftplugin.vim
14: /usr/share/vim/vim81/indent.vim
15: /usr/share/vim/vim81/ftoff.vim
16: /var/lib/vim/addons/plugin/02tlib.vim
17: /var/lib/vim/addons/plugin/Tabular.vim
18: /var/lib/vim/addons/plugin/UltiSnips.vim
19: /var/lib/vim/addons/autoload/UltiSnips/map_keys.vim
20: /var/lib/vim/addons/plugin/airline-themes.vim
21: /var/lib/vim/addons/plugin/airline.vim
22: /var/lib/vim/addons/autoload/airline/init.vim
23: /var/lib/vim/addons/autoload/airline/parts.vim
24: /var/lib/vim/addons/autoload/airline/util.vim
25: /var/lib/vim/addons/plugin/command-t.vim
26: /var/lib/vim/addons/autoload/commandt/mirkwood.vim
27: /var/lib/vim/addons/plugin/fugitive.vim
28: /var/lib/vim/addons/plugin/lastplace.vim
29: /var/lib/vim/addons/plugin/newbb.vim
30: /var/lib/vim/addons/plugin/newbbappend.vim
31: /var/lib/vim/addons/plugin/snipMate.vim

32: /var/lib/vim/addons/autoload/funcref.vim
33: /var/lib/vim/addons/plugin/snipMateInterface.vim
34: /var/lib/vim/addons/plugin/syntastic/autoloclist.vim
35: /var/lib/vim/addons/plugin/syntastic/balloons.vim
36: /var/lib/vim/addons/plugin/syntastic/checker.vim
37: /var/lib/vim/addons/plugin/syntastic/cursor.vim
38: /var/lib/vim/addons/plugin/syntastic/highlighting.vim
39: /var/lib/vim/addons/plugin/syntastic/loclist.vim
40: /var/lib/vim/addons/plugin/syntastic/modemap.vim
41: /var/lib/vim/addons/plugin/syntastic/notifiers.vim
42: /var/lib/vim/addons/plugin/syntastic/registry.vim
43: /var/lib/vim/addons/plugin/syntastic/signs.vim
44: /var/lib/vim/addons/plugin/syntastic.vim
45: /var/lib/vim/addons/autoload/syntastic/util.vim
46: /var/lib/vim/addons/plugin/vimsnippets.vim
47: /usr/share/vim/vim81/plugin/getscriptPlugin.vim
48: /usr/share/vim/vim81/plugin/gzip.vim
49: /usr/share/vim/vim81/plugin/logiPat.vim
50: /usr/share/vim/vim81/plugin/manpager.vim
51: /usr/share/vim/vim81/plugin/matchparen.vim
52: /usr/share/vim/vim81/plugin/netrwPlugin.vim
53: /usr/share/vim/vim81/plugin/rrhelper.vim
54: /usr/share/vim/vim81/plugin/spellfile.vim
55: /usr/share/vim/vim81/plugin/tarPlugin.vim
56: /usr/share/vim/vim81/plugin/tohtml.vim
57: /usr/share/vim/vim81/plugin/vimballPlugin.vim
58: /usr/share/vim/vim81/plugin/zipPlugin.vim
59: /var/lib/vim/addons/after/plugin/TabularMaps.vim
60: /var/lib/vim/addons/autoload/tabular.vim
61: /var/lib/vim/addons/after/plugin/UltiSnips_after.vim
62: /var/lib/vim/addons/after/plugin/snipMate.vim
63: /usr/share/vim/vim81/syntax/python.vim
64: /usr/share/vim/vim81/ftplugin/python.vim
65: /usr/share/vim/vim81/indent/python.vim
66: /var/lib/vim/addons/autoload/UltiSnips.vim
67: /var/lib/vim/addons/autoload/airline/extensions.vim
68: /var/lib/vim/addons/autoload/airline/extensions/quickfix.vim
69: /var/lib/vim/addons/autoload/airline.vim
70: /var/lib/vim/addons/autoload/airline/extensions/netrw.vim
71: /var/lib/vim/addons/autoload/airline/extensions/term.vim
72: /var/lib/vim/addons/autoload/airline/section.vim
73: /var/lib/vim/addons/autoload/airline/highlighter.vim
74: /var/lib/vim/addons/autoload/airline/extensions/commandt.vim
75: /var/lib/vim/addons/autoload/airline/extensions/vista.vim
76: /var/lib/vim/addons/autoload/airline/extensions/branch.vim
77: /var/lib/vim/addons/autoload/airline/extensions/fugitiveline.vim
78: /var/lib/vim/addons/autoload/airline/extensions/syntastic.vim
79: /var/lib/vim/addons/autoload/airline/extensions/whitespace.vim
80: /var/lib/vim/addons/autoload/airline/extensions/po.vim
81: /var/lib/vim/addons/autoload/airline/extensions/wordcount.vim
82: /var/lib/vim/addons/autoload/airline/extensions/keymap.vim
83: /var/lib/vim/addons/autoload/airline/themes/dark.vim
84: /var/lib/vim/addons/autoload/airline/themes.vim
85: /var/lib/vim/addons/autoload/airline/builder.vim
86: /var/lib/vim/addons/autoload/airline/extensions/default.vim
87: /var/lib/vim/addons/autoload/syntastic/log.vim
88: /var/lib/vim/addons/autoload/airline/async.vim
89: /var/lib/vim/addons/syntax_checkers/python/bandit.vim
90: /var/lib/vim/addons/syntax_checkers/python/flake8.vim
91: /var/lib/vim/addons/syntax_checkers/python/pyflakes.vim
92: /var/lib/vim/addons/syntax_checkers/python/frosted.vim
93: /var/lib/vim/addons/syntax_checkers/python/mypy.vim
94: /var/lib/vim/addons/syntax_checkers/python/pep257.vim
95: /var/lib/vim/addons/syntax_checkers/python/pep8.vim
96: /var/lib/vim/addons/syntax_checkers/python/prospector.vim
97: /var/lib/vim/addons/syntax_checkers/python/py3kwarn.vim
98: /var/lib/vim/addons/syntax_checkers/python/pycodestyle.vim
99: /var/lib/vim/addons/syntax_checkers/python/pydocstyle.vim
100: /var/lib/vim/addons/syntax_checkers/python/pylama.vim
101: /var/lib/vim/addons/syntax_checkers/python/pylint.vim
102: /var/lib/vim/addons/syntax_checkers/python/python.vim
> --

Christian Brabandt

unread,
Nov 14, 2020, 6:08:34 AM11/14/20
to vim...@googlegroups.com

On Fr, 13 Nov 2020, Mathieu Roux wrote:

> Hello,
>
> In fact, i have just installed all my stuff on a new computer.
>
> I did not installed consciently syntastic or vim-airline, but maybe i
> use it and i don't know.
>
> Bellow is my :scriptnames.

Well, according to your :scriptnames output, you have installed it as
your distros package.

> 21: /var/lib/vim/addons/plugin/airline.vim

Here is airline.

> 34: /var/lib/vim/addons/plugin/syntastic/autoloclist.vim

Here is syntastic

I suggest, either getting yourself familiarize with the plugins (by
reading the documentation) or disabling those plugins or uninstalling
those packages.


Best,
Christian
--
Man sollte wirklich nur die zusammen leben lassen, die ohne einander
sterben würden.
-- Ludwig Anzengruber

Mathieu Roux

unread,
Nov 30, 2020, 10:55:27 AM11/30/20
to vim...@googlegroups.com
Hello,

OK you're right, the problem was syntastic.

I can disable with

:SyntasticToggleMode


What can i type in .vimrc to disable syntastic automatically?

Thanks,
Mathieu
> --

rwmit...@gmail.com

unread,
Nov 30, 2020, 12:46:10 PM11/30/20
to vim_use
If you're not going to use Syntastic, why not un-install it?

Have you considered learning what Synstatic is trying to show you, could make you a better programmer.

Mathieu Roux

unread,
Nov 30, 2020, 12:51:19 PM11/30/20
to vim...@googlegroups.com
I have so less time... so many things to do...

Syntastic reproach me when i write
L = [ 1,2,3 ] in python
instead of
L=[1,2,3]
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google
> Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to vim_use+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vim_use/db5280b7-7384-4ef7-b316-d203de61dc84n%40googlegroups.com
> .

Christian Brabandt

unread,
Dec 1, 2020, 2:28:11 AM12/1/20
to vim...@googlegroups.com

On Mo, 30 Nov 2020, Mathieu Roux wrote:

> OK you're right, the problem was syntastic.
>
> I can disable with
>
> :SyntasticToggleMode
>
>
> What can i type in .vimrc to disable syntastic automatically?

Put

let g:loaded_syntastic_plugin = 1

into your .vimrc

Or, disable this system plugin, by using Debians vim-addon-manager

~$ vim-addon-manager disable syntastic

or uninstall the plugin:

~$ sudo apt remove vim-syntastic


Best,
Christian
--
Was ist das Allgemeine?
Der einzelne Fall.
Was ist das Besondere?
Millionen Fälle.
-- Goethe, Maximen und Reflektionen, Nr. 875
Reply all
Reply to author
Forward
0 new messages