vim apparently ignoring -c nomodeline cmdline option

2007-06-05 Thread Rodolfo Borges

When opening a file that ends with
# vim:fdm=marker:
vim keeps doing the folding, even if I call it with -c nomodeline (I
also tried -c modelines=0).

Is it vim fault's, or (more likely) mine?

--
Rodolfo Borges


valgrind filetype detection

2007-03-29 Thread Rodolfo Borges

When opening a valgrind output file, the syntax highlighting was not
being automatically turned on.
I found that on scripts.vim it's checking for 'valgrind' on the first
line, but my version of valgrind (3.2.1 ) prints 'Memcheck' instead.
So I fixed it adding the second elseif bellow:

  Valgrind
 elseif s:line1 =~ '^==\d\+== valgrind'
   set ft=valgrind
 elseif s:line1 =~ '^==\d\+== Memcheck'
   set ft=valgrind

Maybe this should be included on Vim distribution?

--
Rodolfo Borges


Re: problems compiling on solaris

2007-03-07 Thread Rodolfo Borges

On 3/7/07, A.J.Mechelynck [EMAIL PROTECTED] wrote:

The first error mentioned (at vim:h:41) is part of the following:
# if (SIZEOF_INT == 0)
 Error: configure did not run properly.  Check auto/config.log.
# endif


Shouldn't that be:

# if (SIZEOF_INT == 0)
# error  Configure did not run properly.  Check auto/config.log.
# endif

--
Rodolfo Borges


some ideas

2006-12-11 Thread Rodolfo Borges

(1)
When tab-completing on Vim :cmdline, start with the dir of the current
file being edited, instead of the $PWD (use ./ for that).


(2)
When pasting, arrange spaces and separators automagically:
Exemple:
('[x]' means the cursor is over char 'x', the brackets are not part of the text)

red, [b]lue, green
dW
red, [g]reen
$
red, gree[n]
p
red, green, blu[e]


(3)
A mode (to be used by /usr/bin/view) with less-like interface.
I currently use :so=999 for easier scrolling.


(4)
About that generic syntax highlighting that uses just # for comments,
and  ' for strings:
Don't hightlight the # unless on the first column, and don't
hightlight strings at all.


Best regards,

--
Rodolfo Borges


Re: Fighting with comments

2006-10-20 Thread Rodolfo Borges

On 10/18/06, Gary Johnson [EMAIL PROTECTED] wrote:

The way to fix this problem is to create two new directories:

$VIM\vimfiles\after
$VIM\vimfiles\after\ftplugin

on Windows or

~/.vim/after
~/.vim/after/ftplugin

on Unix.  Then create a new file in the after/ftplugin directory
named php.vim and put in it those commands that fix the problem,
e.g.,

setlocal nosta
setlocal noai
setlocal nosi


An alternative to creating ~/.vimrc/after/ftplugin/php.vim is to put
it in your ~/.vimrc, using the autocmd FileType feature, like this:

autocmd! FileType php setlocal nosta | setlocal noai | setlocal nosi

For example, I have this:

autocmd! FileType perl FileTypePerl
command! FileTypePerl setlocal makeprg=perl\ -c\ %
\   | let perl_extended_vars=1
\   | setlocal keywordprg=perldoc\ -f
\   | setlocal cindent
\   | setlocal errorformat=
\%-G%.%#had\ compilation\ errors.,
\%-G%.%#syntax\ OK,
\%m\ at\ %f\ line\ %l.,
\%+A%.%#\ at\ %f\ line\ %l\\,%.%#,
\%+C%.%#

--
Rodolfo Borges


sp *.c

2006-09-22 Thread Rodolfo Borges

:sp *.c
gives me too many files (same with :e *.c)

why not do a split for every file?
(if there's no room, maybe then give the too many files error.)

just .2 c$

--
Rodolfo Borges


simple netrw feature sugestion

2006-09-05 Thread Rodolfo Borges

When I use the :Explore or :Sexplore command,
the cursor could be positioned on the file I was just editing.


PS: why are the .h's positioned after the .o's by default?
I do know how to change it (removed the .h$ from g:netrw_sort_sequence),
I'm just questioning what seems to me a non-sensible default,
since one don't edit the .o's, but do edit the .h's a lot.

--
Rodolfo Borges


using counter prefix in a map/command

2006-08-21 Thread Rodolfo Borges

I did the following command to open man pages inside Vim:

nmap K :Man C-RC-WCR
command! -bar -nargs=1 DoMan %!/usr/bin/man -P cat args
command! -bar -nargs=1 Man
\   new
\|  DoMan args
\|  %s/.^H//g
\|  set filetype=man
\|  goto 1
\|  set buftype=nofile

It works nice, but I want also to be able to specify the man section,
mas many C commands are also bash or shell commands,
like exit, stat, and so on.

I'm sure it's written in the extensive online documentation,
but my lazyless is greater then my shame to ask it here. :)

--
Rodolfo Borges


Re: Doing something til specific column

2006-08-20 Thread Rodolfo Borges

I tried something like this:

:%s/^\(Chapter\ [0-9]\+:\ .*\)\%30c$/\1\./g

I works fine, but needs to be repeated until no more matches are found.
I'm sure you guys more experencied with Vim scripting will be able to
complete my idea.

--
Rodolfo Borges


Re: Folding and the Desert color scheme

2006-08-15 Thread Rodolfo Borges

cp /usr/share/vim/vim70/colors/desert.vim ~/.vim/colors/my-desert.vim
vim ~/.vim/colors/my-desert.vim
echo colorscheme my-desert  ~/.vimrc

That's what I did here.
I just couldn't put the Cursor, CursorLine and CursorColor to work.


On 8/15/06, Ben lemasurier [EMAIL PROTECTED] wrote:

Hey everyone,

I just setup folding and it works great however when using my favorite
color scheme (desert) the fold header (+-- 70 lines: class ClassName
) is black, which makes it invisible on my
terminal. Is there a way to fix this without using a different color
scheme?

thanks!

Ben




--
Rodolfo Borges


Re: search and replace multiple words

2006-08-11 Thread Rodolfo Borges

Close. I mean, the regexp is ok, but the LaTeX is not.

You seem to intentionaly match 1.2.3, but as far as I remember, the
\subsection{} command of LaTeX is for 1.2 only, 1.2.3 should be a
\subsubsection{}.

So...

s/^\d\+\.\d\+\s\+\(.*\)$/\\subsection{\1\}/
s/^\%(\d\+\.\){2}\d\+\s\+\(.*\)$/\\subsubsection{\1\}/
s/^\%(\d\+\.\){3}\d\+\s\+\(.*\)$/\\subsubsubsection{\1\}/

--
Rodolfo Borges


Re: Show/Hide Split Windows

2006-08-10 Thread Rodolfo Borges

On 8/10/06, Charles E Campbell Jr [EMAIL PROTECTED] wrote:

Type   ctrl-w o  to toggle between maximizing one window and restoring
to all.   By maximizing, I mean that the current
window will take over the entire display, not leaving a lot of status
bars around.


Actually,  Ctrl-w o  will close all other windows.
You can't get back to them using  Ctrl-w o  again

--
Rodolfo Borges


vim -S

2006-07-31 Thread Rodolfo Borges

I made a file with vim commands, starting with
#!/usr/bin/vim -S
so I can execute the file directly, instead of using vim -S file.
The problem is that vim tries to execute this first line too.

Can we have a workaround on this?
Like, ignoring #! at the start of a command, instead of giving the
no ! allowed error?
Or am I having it all wrong?

--
Rodolfo Borges