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


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


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 
command! -bar -nargs=1 DoMan %!/usr/bin/man -P cat 
command! -bar -nargs=1 Man
\   new
\|  DoMan 
\|  %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