Re: Autocommand vs ftplugin

2014-11-06 Thread Matteo Riva
On Thu, Nov 6, 2014 at 12:47 AM, Gary Johnson wrote: > The php_folding variable controls the behavior of the syntax/php.vim > file, not the ftplugin/php.vim file. Also, if you have > > syntax on > > in your ~/.vimrc before > > filetype plugin on > > then syntax/php.vim will be sourced be

Re: Autocommand vs ftplugin

2014-11-05 Thread Matteo Riva
On Wed, Nov 5, 2014 at 7:54 PM, Christian Brabandt wrote: > Do you actually have a line :filetype on or similar in your .vimrc? Yes I do, and I could verify that the ftplugin file is executed (I set a custom variable and it shows when opening the file) -- -- You received this message from the

Autocommand vs ftplugin

2014-11-05 Thread Matteo Riva
There is something I'm not understanding about this: if I write this in my .vimrc file au BufNewFile,BufRead *.php let php_folding=1 | set foldlevel=1 then php folding works fine, but if I put this two lines in ftplugin/php.vim or after/ftplugin/php.vim set foldlevel=1 let php_folding=1 t

Matchit plugin doesn't match square brackets

2014-08-20 Thread Matteo Riva
When using the matchit plugin I can't get the matching to work on square brackets, unless I use the :MatchDebug command, then they work fine. Everything else is working as far as I can tell, and b:match_words includes [:] Tested both on vim 7.2 and 7.3 (same config and plugins, two different debia

Re: Autoclose plugin breaks abbreviations expansion

2012-09-05 Thread Matteo Riva
On Wed, Sep 5, 2012 at 4:00 PM, Christian Brabandt wrote: > This must be a differen AutoClose plugin not the one you mentioned > in your first message: > http://www.vim.org/scripts/script.php?script_id=2009 > > This only has 189 lines (and doesn't remap ). You are right, there are apparently two

Re: Autoclose plugin breaks abbreviations expansion

2012-09-05 Thread Matteo Riva
On Wed, Sep 5, 2012 at 3:49 PM, Christian Brabandt wrote: > Are you sure it is autocloses fault? This plugin doesn't remap > for me. It does (line 456 of plugin/AutoClose.vim): inoremap =Space() also if I disable the plugin, abbreviations work fine. -- You received this message fro

Autoclose plugin breaks abbreviations expansion

2012-09-05 Thread Matteo Riva
I have installed the vim autoclose plugin[1] which is quite useful but due to the remapping of now insert mode abbreviations aren't expanded anymore (must do it with CTRL-]). Is it possible to have both functionalities together? [1] http://www.vim.org/scripts/script.php?script_id=2009 -- Yo

Why can't I set perl_fold in ftplugin/perl.vim?

2010-12-12 Thread Matteo Riva
If I add: let perl_fold = 1 in ~/.vimrc it works fine, foldmethod is set to syntax and subs are folded. If I put that line in ~/.vim/ftplugin/perl.vim instead, subs are not folded and foldmethod is set to manual, but even if I add "set foldmethod=syntax" to ftplugin/perl.vim subs are still not

Re: Compiling gvim on Debian

2010-09-22 Thread Matteo Riva
2010/9/22 Dominique Pellé : > On Ubuntu (I assume that it's the same on Debian), you can > install all packages needed to be able to compile the gnome > version of Vim with: > > $ sudo apt-get build-dep vim-gnome > > Even if you managed to compile Vim with GUI, you may still > want to try that in c

Re: Compiling gvim on Debian

2010-09-22 Thread Matteo Riva
On Wed, Sep 22, 2010 at 11:13 AM, Matteo Riva wrote: > I'm trying to compile vim with gui support on a Debian system.  I can't > seem to figure how to enable the gui option, I tried > >   ./configure --enable-gui=gnome2 > > assuming it would at least check for the re

Compiling gvim on Debian

2010-09-22 Thread Matteo Riva
I'm trying to compile vim with gui support on a Debian system. I can't seem to figure how to enable the gui option, I tried ./configure --enable-gui=gnome2 assuming it would at least check for the required libraries and warn me if any are missing, but in configure's output there is no mention

Re: Restricting methods shown by omnicomplete to those present in ctags

2010-06-10 Thread Matteo Riva
On Thu, Jun 10, 2010 at 5:39 PM, Mikolaj Machowski wrote: > Problem is that ctags up to 5.8 didn't understood PHP's classes so completion > script doesn't know when and how limit offered choice. Well, that would make sense if omnicompletion didn't find the class methods at all, how does it expla

Re: Restricting methods shown by omnicomplete to those present in ctags

2010-06-10 Thread Matteo Riva
On Thu, Jun 10, 2010 at 1:12 PM, David Fishburn wrote: > There is no automatic way to do that. But a vimscript might be able to do. > The script could only do it if the tags information has everything you need. Well I was more interested in understanding if it may depend on something I'm doing w

Re: Restricting methods shown by omnicomplete to those present in ctags

2010-06-10 Thread Matteo Riva
On Thu, Jun 10, 2010 at 2:22 AM, David Fishburn wrote: > When you run ctags do the methods for the class have a scope added? > Myclass.mymethod Not sure what you mean, but class methods do appear in omnicompletion, it's just that a lot more unrelated stuff pops up -- and I'd like to get rid of t

Restricting methods shown by omnicomplete to those present in ctags

2010-06-03 Thread Matteo Riva
I'm editing a simple PHP file with a class which has a few methods, if $bar is an instance of this class and I type $bar-> I get a popup with a lot of methods (builtin ones) in addition to those of my class and present in the ctags list. How can avoid showing all those external methods and ju

Display custom reference bar on top of window

2009-11-15 Thread Matteo Riva
I would like to set up a vim environment for basic HTML edit to be used by someone else. For this I'd like to set up a quick reference bar to be shown on top of the window with things like " | " and so on. Can this be done? Thanks. --~--~-~--~~~---~--~~ You re

Expanding variables

2009-11-08 Thread Matteo Riva
If I have these lines in a script: let filename = something new filename new takes the literal string 'filename' instead of expanding it and using its value. How can I tell :new to expand the variable instead? Thanks --~--~-~--~~~---~--~~ You re

Re: Adding commands to NERDTree

2009-11-08 Thread Matteo Riva
On Sat, Nov 7, 2009 at 12:19 PM, Matteo Riva wrote: > I would like to add custom functions to files in the browser window, > like running a script that inserts the correct XHTML tag when used on an > image, or inserting require() lines on the selected module and so on. > > Is it

Re: Store output of external command into a register

2009-11-07 Thread Matteo Riva
On Sat, Nov 7, 2009 at 10:11 PM, Kent Sibilev wrote: >> Thanks, one more thing. How can I add the value of as an >> argument to the external command?  Say I want to "ls -l" the file under >> the cursor: > system("ls -l " . expand('')) Thanks a lot Kent. --~--~-~--~~~-

Re: Store output of external command into a register

2009-11-07 Thread Matteo Riva
On Sat, Nov 7, 2009 at 9:59 PM, Kent Sibilev wrote: > > On Sat, Nov 7, 2009 at 3:53 PM, Matteo Riva wrote: >> >> Is it possible to run an external command and store its output in a >> register? > let files = system("ls") Thanks, one more thing. How can I ad

Store output of external command into a register

2009-11-07 Thread Matteo Riva
Is it possible to run an external command and store its output in a register? :redir works for ex commands, not for external commands (afaik) :r !runs the external command but directly inserts output into the current buffer --~--~-~--~~~---~--~~ You r

Adding commands to NERDTree

2009-11-07 Thread Matteo Riva
I would like to add custom functions to files in the browser window, like running a script that inserts the correct XHTML tag when used on an image, or inserting require() lines on the selected module and so on. Is it possibile with NERDTree or is there any other browser plugin that supports this

Handling both visual and visual-line selections

2009-10-10 Thread Matteo Riva
The problem I'm facing is creating mappings (for things like wrapping the selected text with some stuff) which work both on "plain" visually selected text and linewise visually selected text. The tricky part is the trailing new line character in the visual-line case. Can this be directly handled

AutoComplPop_MappingDriven

2009-05-05 Thread Matteo Riva
>From the doc: g:AutoComplPop_MappingDriven: The auto-popup is triggered by key mappings instead of CursorMovedI event if non-zero is set. This is useful to avoid auto-popup by moving cursor in Insert mode. i tried setting this with 'let g:AutoComplPop_MappingDriven=1'

Can't :imap

2009-05-04 Thread Matteo Riva
Why can I do :imap   and it works fine, while :imap   seems to ignore the mapping and just inserts one space? Is a valid mapping at all? -- gvim 7.1.314 --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more infor

Re: How to ask for input and use it

2009-05-02 Thread Matteo Riva
Actually nevermind, I just read (and thought) better, and came up with this: nmap \h :call MyInput():normal a"npa function! MyInput() call inputsave() let @h = input("Enter URL: ") let @n = input("Enter name: ") call

How to ask for input and use it

2009-05-02 Thread Matteo Riva
Hello everybody. I'm trying to understand how to ask user for input and then insert that text into the buffer. For example, consider I'd like to have a double input request, asking the user to enter a URL and a name so that I can write a formatted HTML code for a link into the current buffer. :