Tagged Questions
1
vote
2answers
79 views
Edit multiple files in 1 vim buffer
I'm making a vim script to take notes, and it should be tag aware.
So when I add a note it should appear under all the correct sections like this:
To avoid making lots of copies of the same text ...
-2
votes
1answer
53 views
vim + python buffer replacement using the “blackhole register”
A simple python operation in vim scripting:
vim.current.buffer[current] = 'new line';
This overrides the current register, which I do not wish do to.
In other words, I want to replace the line ...
0
votes
1answer
30 views
Python filtering: only keep most recent python MacPort
I have a file open in Vim:
py24-sqlalchemy
py25-beautifulsoup
py25-beautifulsoup4
py25-bpython
py25-epydoc
py25-icalendar
py25-ipython
py25-libgmail
py25-mechanize
py25-numpy
py25-pil
py25-simplejson
...
1
vote
2answers
102 views
Capture output of vim command in Python
I want to capture the output of a Vim command (:sign place), scripting in Python with the vim module.
I can execute commands with vim.command(...), but this doesn't return the output of the command. ...
1
vote
1answer
39 views
Python if_py and VIM: BufAdd, inserting stuff into a new buffer
When I open a buffer (via :tabnew or any other way), if there
is no filename associated with the buffer, I'd like to insert
some default text (recently opened files).
au BufAdd * call ...
0
votes
1answer
52 views
Python if_py and VIM: exec('import re') does not work
I have a auto-completion script that I would like to modify
to complete class names, attributes, methods, etc. In python
when i do: re.co<TAB> it should give me a list of matching
methods. ...
0
votes
0answers
32 views
Python if_py and VIM: returning a TAB from omnicomplete
I am doing something like this:
"called when i <TAB>
func! Tab_wrapper()
let l:start = 0
python << EOF
import my_lib as ml
import imp
imp.reload(ml)
ml.set_line_empty()
EOF
if ...
2
votes
1answer
220 views
Import vim in python gives back errors
I read some articles about Vimscripting with python. I felt very interested. So I tried to figure out how to do vimscripting with python.
But when I tried to import vim, it showed that the module vim ...
1
vote
1answer
79 views
Passing vim functions to vim's inbuilt python
I am trying to set a python variable in vim using vimscript output. The following code is causing the issue:
python os.environ['DJANGO_SETTINGS_MODULE'] = split(expand("%:p:h"), "\/")[4].'.settings'
...
1
vote
0answers
204 views
E40: Can't open errorfile C:\DOCUME~1\[…] on windows
I'm trying to use pylint.vim on windows.
I have https://github.com/orenhe/pylint.vim version in C:\Program Files\Vim\vimfiles\compiler direcory. I added:
autocmd FileType python compiler pylint
To ...
5
votes
1answer
142 views
how to debug python function which is part of vim plugin?
The python invocation is defined in some of my .vim files.
:breakadd file linenumber xx.vim doesn't seem to work.
When I press a key that triggers the invocation of certain python functions, it ...
2
votes
1answer
269 views
How to display an autocomplete menu in vimscript?
I'm a beginner in vimscript and even if I search the web for hours I haven't be able to find how to do the following thing :
I want to create a vimscript who will allow to open a file by typing just ...
4
votes
2answers
255 views
How do I get python.vim to work with vim?
I am playing around with vim and I heard that python.vim has some nifty settings for python.
Link to python.vim
http://www.vim.org/scripts/script.php?script_id=790
Q1: How do I integrate python.vim ...
5
votes
2answers
2k views
Get offset of current buffer in vim (in particular, via python scripting)
i want to get the offset of
the current cursor position
the current selection range
in vim, beginning from the start of the file. I do this in python, so hints how to do it with vim's python ...
1
vote
1answer
582 views
VIM: Use python 2.5 with vim 7.2
How can use Python2.5 with to write scripts in vim? I'm using vim 7.2 and have Python 2.5. Vim 7.2 seem to be linked with Python 2.4
Do I have to compile from source?