mirror of
https://github.com/gryf/.vim.git
synced 2025-12-17 11:30:29 +01:00
Separated filetype specific settings into ftplugin directory,
added pydoc plugin added surround plugin instead of annoying (in the end) delimitMate plugin. removed some experimental files with colors added jythongold folding for python added rst snippets added tmux configuration filetype added pylint compiler updated pyflakes
This commit is contained in:
@@ -43,6 +43,7 @@ sys.path.insert(0, scriptdir)
|
||||
|
||||
from pyflakes import checker, ast, messages
|
||||
from operator import attrgetter
|
||||
import re
|
||||
|
||||
class SyntaxError(messages.Message):
|
||||
message = 'could not compile: %s'
|
||||
@@ -55,7 +56,20 @@ class blackhole(object):
|
||||
|
||||
def check(buffer):
|
||||
filename = buffer.name
|
||||
contents = '\n'.join(buffer[:]) + '\n'
|
||||
contents = buffer[:]
|
||||
|
||||
# shebang usually found at the top of the file, followed by source code encoding marker.
|
||||
# assume everything else that follows is encoded in the encoding.
|
||||
encoding_found = False
|
||||
for n, line in enumerate(contents):
|
||||
if not encoding_found:
|
||||
if re.match(r'^# -\*- coding: .+? -*-', line):
|
||||
encoding_found = True
|
||||
else:
|
||||
# skip all preceeding lines
|
||||
contents = [''] * n + contents[n:]
|
||||
break
|
||||
contents = '\n'.join(contents) + '\n'
|
||||
|
||||
vimenc = vim.eval('&encoding')
|
||||
if vimenc:
|
||||
|
||||
Reference in New Issue
Block a user