mirror of
https://github.com/gryf/.vim.git
synced 2025-12-17 19:40:29 +01:00
Modified wombat color theme (colors for column adn visual block)
Modified class for reST, added support for acronyms html Cosmetic changes on pylint python module Removed leftovers from nerd tree plugin
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
" Author: Roman 'gryf' Dobosz (gryf73 at gmail.com)
|
||||
" Version: 1.0
|
||||
" Last Modified: 2010-09-12
|
||||
" Description: {{{
|
||||
"
|
||||
" Overview
|
||||
" --------
|
||||
@@ -42,6 +43,8 @@
|
||||
" [2] http://pypi.python.org/pypi/pep8
|
||||
" [3] http://www.vim.org/scripts/script.php?script_id=2441
|
||||
" [4] http://pypi.python.org/pypi/setuptools
|
||||
"
|
||||
" }}}
|
||||
|
||||
if exists("b:did_pep8_plugin")
|
||||
finish " only load once
|
||||
@@ -53,7 +56,7 @@ if !exists("b:did_pep8_init")
|
||||
let b:did_pep8_init = 0
|
||||
|
||||
if !has('python')
|
||||
echoerr "Error: the pep8_fn.vim plugin requires Vim to be compiled with +python"
|
||||
echoerr "pep8_fn.vim plugin requires Vim to be compiled with +python"
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
" File: pythonlint.vim
|
||||
" File: pylint_fn.vim
|
||||
" Author: Roman 'gryf' Dobosz (gryf73 at gmail.com)
|
||||
" Version: 1.0
|
||||
" Last Modified: 2010-09-11
|
||||
"
|
||||
" Description: " {{{
|
||||
"
|
||||
" Overview
|
||||
" --------
|
||||
" This plugin provides ":Pylint" command, which put pylint result into quickfix
|
||||
@@ -18,7 +20,7 @@
|
||||
"
|
||||
" Installation
|
||||
" ------------
|
||||
" 1. Copy the pythonlint.vim file to the $HOME/.vim/ftplugin/python or
|
||||
" 1. Copy the pylint_fn.vim file to the $HOME/.vim/ftplugin/python or
|
||||
" $HOME/vimfiles/ftplugin/python or $VIM/vimfiles/ftplugin/python
|
||||
" directory. If python directory doesn't exists, it should be created.
|
||||
" Refer to the following Vim help topics for more information about Vim
|
||||
@@ -40,6 +42,7 @@
|
||||
" [1] http://www.logilab.org/project/pylint
|
||||
" [2] http://www.vim.org/scripts/script.php?script_id=2441
|
||||
" [3] http://pypi.python.org/pypi/setuptools
|
||||
" }}}
|
||||
|
||||
if exists("b:did_pylint_plugin")
|
||||
finish " only load once
|
||||
@@ -51,7 +54,7 @@ if !exists("b:did_pylint_init")
|
||||
let b:did_pylint_init = 0
|
||||
|
||||
if !has('python')
|
||||
echoerr "Error: the pythonlint.vim plugin requires Vim to be compiled with +python"
|
||||
echoerr "Error: pylint_fn.vim requires Vim to be compiled with +python"
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
@@ -12,10 +12,15 @@ map <F5> :call <SID>Rst2Blogger()<cr>
|
||||
" suitable to copy and paste into blogger post.
|
||||
fun <SID>Rst2Blogger()
|
||||
python << EOF
|
||||
import re
|
||||
|
||||
from docutils import core
|
||||
from docutils import nodes
|
||||
from docutils.writers.html4css1 import Writer, HTMLTranslator
|
||||
|
||||
import vim
|
||||
|
||||
|
||||
class NoHeaderHTMLTranslator(HTMLTranslator):
|
||||
def __init__(self, document):
|
||||
HTMLTranslator.__init__(self,document)
|
||||
@@ -41,6 +46,21 @@ class NoHeaderHTMLTranslator(HTMLTranslator):
|
||||
def depart_section(self, node):
|
||||
pass
|
||||
|
||||
def visit_acronym(self, node):
|
||||
node_text = node.children[0].astext()
|
||||
node_text = node_text.replace('\n', ' ')
|
||||
patt = re.compile(r'^(.+)\s<(.+)>')
|
||||
|
||||
if patt.match(node_text):
|
||||
node.children[0] = nodes.Text(patt.match(node_text).groups()[0])
|
||||
self.body.append(\
|
||||
self.starttag(node, 'acronym',
|
||||
'', title=patt.match(node_text).groups()[1]))
|
||||
|
||||
else:
|
||||
self.body.append(self.starttag(node, 'acronym', ''))
|
||||
|
||||
|
||||
_w = Writer()
|
||||
_w.translator_class = NoHeaderHTMLTranslator
|
||||
|
||||
|
||||
Reference in New Issue
Block a user