Re: gVim 7.0d bug refreshing guitablabel initialized by autocmd

2006-04-17 Thread Steve Hall
On Sun, 2006-04-16 at 13:03 +0200, Bram Moolenaar wrote:
 Steve Hall wrote:
 
  I'm seeing a gVim 7.0d (GTK2) bug in refreshing the GUI tab bar.
  When a guitablabel is set by autocmd (VimEnter, BufEnter, etc),
  the results aren't actually shown until the Vim window is
  refreshed, such as with :set nu or :set list.
 
 I fixed this a couple of days ago.  Perhaps it's time for 7.0e...

Hmm, still broken for me in 7.0e.


-- 
Steve Hall  [ digitect mindspring com ]




vim70e, can't get rid of some buffers

2006-04-17 Thread Eric Arnold
I'm occasionally getting buffers that I can't get rid of.  I've tried
bwipe!, bdel!, etc.  I don't know how to reproduce this state at
will yet, but I'm wondering if I'm doing something wrong trying to
delete/wipe, or if there is something else to try to diagnose it.  As
best as I can tell, they no longer receive events.  (No error messages
either.)

.


Re: Using args argdo to change many files regarding a pattern spanning 3 lines

2006-04-17 Thread Yakov Lerner
On 4/17/06, Eric Arnold [EMAIL PROTECTED] wrote:
 Are you saying that your substitution works for one file but not for
 many with argo?

 Anyway, specifying ^M isn't very portable, so you probably want
 \n instead.  Also, you can save yourself using  \/  everywhere by using

 :s;pattern1;pattern2;ge

 Using  \s*  or  \s\+  instead of entering literal tabs or spaces can
 also save some headaches.

 You may also be getting into some trouble using the \ branch syntax.
 It's tricky (I've rarely used it) and it isn't clear in your example
 that it's being used correctly to and together the different pattern
 segments.  I could be confusing some syntax related to nbsp, but I
 don't think you want the \  if you want to match nbsp literally.

 Save some typing using \d\d\d\d  or \d\{4}  instead of [0-9]...


 On 4/16/06, Mike Blonder [EMAIL PROTECTED] wrote:
  Hi.
 
  I am unable to successfully use args  argdo to change many files for a
  specific pattern that spans 3 lines.  The files are .htm files.
 
  I have used set listchars=:tab-,trail:- to reveal the tabs within the
  file and have included what I take to be precisely the pattern within
  the argdo statement:
 
  argdo %s/\/tr^Mtd valign=middle
  height=22font size=1\nbsp;img src=\/images\/arrowright.gif
  border=0 alt=[0-9][0-9][0-9][0-9]\nbsp;a
  href=\/What_is_New.htmWhat's New?\/a\/font\/td^M//ge | update
 
  The [0-9][0-9][0-9][0-9] represents 4 digits that are in each iteration
  of the line but 4 digits that change from file to file.  The ^Ms are
  properly expresses with at ctrl V ctrl M sequences.
 
  Am I missing, perhaps an end of line character?

Change \ to plain . Literal  does not need to be escaped in the 'pattern'
part of s///. \ means something different, as Eric mentioned.

Yakov


gvim not reading gvimrc

2006-04-17 Thread Anthony Campbell
I've just had to reinstall vim after a crash of X on my Debian system
(Sid)

Vim reads its .vimrc file correctly but gvim does not read .gvimrc.
Instead it seems to be reading some other configuration file with
different mappings and the wrong font. I cannot source my gvimrc file,
even with an absolute path namea. And gvim -U /home/ac/.gvimrc also
doesn't bring it up.

Can anyone suggest what is happening here?


Anthony

-- 
Anthony Campbell - [EMAIL PROTECTED] 
Microsoft-free zone - Using Linux Gnu-Debian
http://www.acampbell.org.uk (blog, book reviews, 
on-line books and sceptical articles)



Re: gvim not reading gvimrc

2006-04-17 Thread Anthony Campbell
On 17 Apr 2006, Yakov Lerner wrote:
 On 4/17/06, Anthony Campbell [EMAIL PROTECTED] wrote:
  I've just had to reinstall vim after a crash of X on my Debian system
  (Sid)
 
  Vim reads its .vimrc file correctly but gvim does not read .gvimrc.
  Instead it seems to be reading some other configuration file with
  different mappings and the wrong font. I cannot source my gvimrc file,
  even with an absolute path namea. And gvim -U /home/ac/.gvimrc also
  doesn't bring it up.
 
  Can anyone suggest what is happening here?
 
 Vim6 or vim7 ? Can you attach the problematic .gvimrc ?
 What does :scriptnames show ?
 
 Yakov

This is 6.4.

:map shows a lot of things I don't recognize, for example:

 PlugPotwikiPrev  SNR10_PrevWord
   PlugPotwikiNext  SNR10_NextWord
   PlugPotwikiEdit  SNR10_Edit
   PlugPotwikiReload  SNR10_Reload
   PlugPotwikiClose  SNR10_Close
   PlugPotwikiFollow  SNR10_Follow
   PlugPotwikiCR  SNR10_CR
   PlugPotwikiIndex  SNR10_Index

Where does this come from?


:sriptnames shows the correct /home/ac/.gvimrc

This is the .gvimrc; it is the same file I was using previously.





winpos 90 20

turn off Alt for menus (use mouse)
set winaltkeys=no

set smartcase to make vim search according to case
se smartcase
set status bar to show file you are editing
   se laststatus=2
set show matching brackets
se showmatch
set cursor for Command, Visual, Normal
   set gcr=n-c-v-o:nCursor 
 set cursor not to blink in Insert only
 or to start blinking after some msecs.
set gcr=i:ver30-blinkwait5000
   set gcr=i:ver30-blinkon0
   set gcr=i:blinkwaiti5
hide mouse when typing text
set mousehide

set guioptions-=T
set shm+=I


syntax on

turn off Alt for menus (use mouse)
set winaltkeys=no

set smartcase to make vim search according to case
se smartcase
set status bar to show file you are editing
   se laststatus=2
set show matching brackets
se showmatch
set cursor for Command, Visual, Normal
   set gcr=n-c-v-o:nCursor 
 set cursor not to blink in Insert only
 or to start blinking after some msecs.
   set gcr=i:ver30-blinkwait9000
   set gcr=i:ver30-blinkon0
   set gcr=i:blinkwait2
hide mouse when typing text
set mousehide
turn off Alt for menus (use mouse)
set winaltkeys=no

 set 
guicursor=i:ver40-iCursor,r:hor35-rCursor,n:block-nCursor,v:hor75-vCursor,a:blinkwait5000
set guifont=Monospace\ Bold\ 12
set guifont=Bitstream\ Vera\ Sans\ Mono\ \Bold 

colorscheme peachpuff
colorscheme desert


  hi Cursorguibg=red
  hi iCursor   guibg=cyan
  hi rCursor   guibg=yellow
  hi vCursor   guibg=blue 
  hi nCursor   guibg=green 





 make backspace work in X
set BS=

keep some lines around cursor
set scrolloff=3

set BACKSPACE to delete continuously in Insert mode
se bs=2



set autoindent on
se ai

set smartcase to make vim search according to case
se smartcase
set status bar to show file you are editing
se laststatus=2
set show matching brackets
se showmatch

set directory for swap files
se dir=~/.swp

set ruler
set ruler


MAPPINGS:

search stuff
 This turns off search highlighting after CR
nnoremap silent CR :nohlsearchCR
turning stuff off and on
set nohlsearch
set incsearch


Change preceding word to uppercase in Insert mode
map! C-F EscgUiw`]a

Make alt-o insert new line in Insert
imap M-o ACR


ct to count file
cab ct  !wc -w
ls to ls 
cab ls !ls 


map ctrl-P to produce p 
   
map C-p pESC
imap C-p p

alt-s to save file 
map M-s :wCR
imap M-s :wCR

alt-S to save file and exit
map M-S :wqCR
imap M-S :wqCR

alt-q to quit if saved 
map M-q  :qCR
imap M-q :qCR

alt-Q to quit unconditionally
map M-Q ZQ
imap M-Q ZQ

alt-f to format para (cursor within para)
noremap M-f   gqip
inoremap M-f  gqip

alt-F to format para (cursor outside para)
noremap M-F   gqap
inoremap M-F  gqap

alt-d  to delete line
imap M-d dd
map M-d  dd

alt-u to undelete 
map M-u u
imap M-u u

F11 to insert date
map F11  mx:r!setdateCRBS
imap F11 :r!setdateCRBS


alt-p to insert text from another window
map M-p  *p 
imap M-p  *p 

Find in insert
imap M-/ /

Next find
imap M-n n
map M-n n

 Alt-e to end of line in Insert mode
   imap ? End


F12 to bring up my help file
map F12 :split ~/.helpvim.txtCR
imap F12 :split ~/.helpvim.txtCR

Shift-F12 to close the help file
map S-F12 :closeCR
imap S-F12 :closeCR

Highlighting stuff
map F3 \hcli
map F4 \hcls




-- 
Anthony 

Re: patched ctags

2006-04-17 Thread Bram Moolenaar

Marc Chantreux wrote:

 i'm trying to use ft-c-omni. I've patched and recompiled ctags and tried 
 to use it. The omnicompletion c-xc-o failed. my ofu is correct but 
 i think the problem is that ctags doesn't store informations about my 
 structure. If someone can help, here are the facts :
 
 % cat fa.c; ctags fa.c; cat tags
 #include 
 stdio.h 
  
 
 int main ( void ) {
 
 typedef struct {
 int age;
 char * nom;
 char * prenom;
 } personne ;
 
 personne employe;
 
 employe.nom = strdup(chantreux);
 employe.prenom = strdup(marc);
 
 printf(employe : %s , %s,   );
 
 return(0);
 
 }
 !_TAG_FILE_FORMAT   2   /extended format; --format=1 will not 
 append ; to lines/
 !_TAG_FILE_SORTED   1   /0=unsorted, 1=sorted, 2=foldcase/
 !_TAG_PROGRAM_AUTHORDarren Hiebert  /[EMAIL PROTECTED]/
 !_TAG_PROGRAM_NAME  Exuberant Ctags //
 !_TAG_PROGRAM_URL   http://ctags.sourceforge.net/official site/
 !_TAG_PROGRAM_VERSION   5.5.4   //
 mainfa.c/^int main ( void ) {$/;   f

I think that for a structure local to a function ctags doesn't store
information.  You would have to move it outside of the function.

-- 
hundred-and-one symptoms of being an internet addict:
106. When told to go to your room you inform your parents that you
 can't...because you were kicked out and banned.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://www.ICCF.nl ///


Re: gvim not reading gvimrc -SOLVED

2006-04-17 Thread Anthony Campbell
On 17 Apr 2006, Anthony Campbell wrote:
 On 17 Apr 2006, Yakov Lerner wrote:
  On 4/17/06, Anthony Campbell [EMAIL PROTECTED] wrote:
   I've just had to reinstall vim after a crash of X on my Debian system
   (Sid)
  
   Vim reads its .vimrc file correctly but gvim does not read .gvimrc.
   Instead it seems to be reading some other configuration file with
   different mappings and the wrong font. I cannot source my gvimrc file,
   even with an absolute path namea. And gvim -U /home/ac/.gvimrc also
   doesn't bring it up.
  
   Can anyone suggest what is happening here?
  
  Vim6 or vim7 ? Can you attach the problematic .gvimrc ?
  What does :scriptnames show ?
  
  Yakov
 
 This is 6.4.
 
 :map shows a lot of things I don't recognize, for example:
 
  PlugPotwikiPrev  SNR10_PrevWord
PlugPotwikiNext  SNR10_NextWord
PlugPotwikiEdit  SNR10_Edit
PlugPotwikiReload  SNR10_Reload
PlugPotwikiClose  SNR10_Close
PlugPotwikiFollow  SNR10_Follow
PlugPotwikiCR  SNR10_CR
PlugPotwikiIndex  SNR10_Index
 
 Where does this come from?
 
 
 :sriptnames shows the correct /home/ac/.gvimrc
 
 This is the .gvimrc; it is the same file I was using previously.
 


OK, there seems to be something wrong with my .gvimrc, which I'm in the
process of finding. I don't know why it worked previously and doesn't
now.

Anthony

-- 
Anthony Campbell - [EMAIL PROTECTED] 
Microsoft-free zone - Using Linux Gnu-Debian
http://www.acampbell.org.uk (blog, book reviews, 
on-line books and sceptical articles)



Re: Segv with gvim 7.d and 7.e

2006-04-17 Thread Benji Fisher
 Did you try the suggestions from my first reply to make sure you
were using the version you thought you were?  If you have multiple
copies of vim installed in various places, it can get confusing.

 Perhaps it would help to run

$ make test
$ make install

and check the second one for error messages.

HTH --Benji Fisher

On Sun, Apr 16, 2006 at 11:35:34PM -0400, Eddie Ash wrote:
 I am running on debian sarge.  With the flag prefix=/home/elash1/usr/local
 I have set the CFLAG to be -DDEBUG
 but when I run gdb it doesn't find the symbols :( any clue?
 I noticed if I don't do make install, it works fine.  But otherwise gvim 
 doesn't work.
 
 I get the following when i do a backtrace within gdb
 Program recieved signal sigsegv, segmentaqtion fault.
 #0 0x65794f2f in ?? ()
 #1 0x400dd491 in XmWidgetGetBaselines () from /usr/lib/libXm.so.2
 #2 0x400f24ac in xmOptionLabelGadget () from /usr/lib/libxm.so.2
 
 Eddie
 
 
 Benji Fisher wrote:
 
 On Sun, Apr 16, 2006 at 04:53:42PM -0600, Edward Ash wrote:
  
 
 When I try to run gvim I get a 
 
 Vim: Caught deadly signal SEGV
 
 Vim: Finished
 
 
 I am able to run in console with out a problem.
 
 
 Is there anything I can do to help debug this?

 
 
 You could try compiling with the debugging flag set (-DDEBUG) and
 then run under gdb.  If you want others to try to reproduce the problem,
 please tell us what OS you are running, where you get the vim source (I
 recommend ftp://ftp.vim.org/pub/vim/unstable/snapshot/ ) and how you
 compile it.
 
 Make sure you are running the version you think you are running:
 use a full path, try
 
 $ vim --version
 $ vim -g
 $ vim
 :gui
 
 and any other variations I may have missed.
 
 HTH  --Benji Fisher
  
 


How do I get rid of null characters?

2006-04-17 Thread Robert Hicks
I have a log that has embedded null characters (i.e ^@). I need to get 
rid of them all.


Robert



Re: How do I get rid of null characters?

2006-04-17 Thread Yakov Lerner
On 4/17/06, Robert Hicks [EMAIL PROTECTED] wrote:
 I have a log that has embedded null characters (i.e ^@). I need to get
 rid of them all.

:map F2 :s/C-V000//gcr
Then press F2

Yakov


Re: How do I get rid of null characters?

2006-04-17 Thread Robert Hicks

Yakov Lerner wrote:

On 4/17/06, Robert Hicks [EMAIL PROTECTED] wrote:

I have a log that has embedded null characters (i.e ^@). I need to get
rid of them all.


:map F2 :s/C-V000//gcr
Then press F2

Yakov


Thank you!

Rober



RE: RFC: Indexing help files[was: Re: which vim option]

2006-04-17 Thread Suresh Govindachar
 
   Yakov Lerner wrote:
  On 4/17/06, Eddy Petrisor [EMAIL PROTECTED] wrote:
   On 4/17/06, Eric Arnold [EMAIL PROTECTED] wrote:
   
It's a bit confusing what you are looking for.  You
originally asked for an index of keywords, but here you're
asking for contents.  Both are indexed, either through the
:help ^D or :help TAB, or virtually via regexp and
helpgrep.
  
   I agree i mght have not been clear, but I said:
  
   :indexsearch keyword list
  
   which should return a list of all topics that contain the
   keywords in the keyword list
  
If helpgrep doesn't find it, then it isn't part of the help
system, since it
  
   :helpgrep white space
  
   will bring me to the first place where that regexp is found,
   but 1) that is not a list of topics and 2) how do I pass to the
   next place where that matches?
  
   You go to the next/prev place using
   :cn   goto next helpgrep match
   :cp   go to prev helpgrep match
   commands. I my vimrc, I have them mapped to F8 and F7:
   map F7 :cpcr
   map F8 :cncr

  Also try :copen

  --Suresh



Re: RFC: Indexing help files[was: Re: which vim option]

2006-04-17 Thread Eric Arnold
Remember that the regexp can be given as:

:helpgrep \(keyword1\|keyword2\)

or

:helpgrep \(.*keyword1\.*keyword2\)

if you need more complex list searches.


Re: How do I get rid of null characters?

2006-04-17 Thread Eric Arnold
You've gotta be careful about nulls.  Vim stores newlines (^J) as
nulls in some cases, so you might be getting rid of more than you
wanted.

On 4/17/06, Robert Hicks [EMAIL PROTECTED] wrote:
 I have a log that has embedded null characters (i.e ^@). I need to get
 rid of them all.

 Robert




Re: Segv with gvim 7.d and 7.e

2006-04-17 Thread Edward Ash
I have tried the make test, and make install.  And both run with out any
errors.
When I do a vim --version i get the following:


  Did you try the suggestions from my first reply to make sure you
 wIM - Vi IMproved 7.0e BETA (2006 Apr 16, compiled Apr 16 2006 23:19:30)
Compiled by [EMAIL PROTECTED]
Normal version with X11-Motif GUI.  Features included (+) or not (-):
-arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
+comments
+cryptv -cscope +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic
-emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path
+folding -footer +fork() +gettext -hangul_input -iconv +insert_expand
+jumplist
 -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse +mouseshape -mouse_dec -mouse_gpm
-mouse_jsbterm -mouse_netterm +mouse_xterm -multi_byte +multi_lang -mzscheme
+netbeans_intg -osfiletype +path_extra -perl +postscript +printer -profile
-python +quickfix -rightleft -ruby +scrollbind +signs +smartindent -sniff
+statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white
-tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands
+vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore
+wildmenu +windows +writebackup +X11 +xfontset +xim +xsmp_interact
+xterm_clipboard -xterm_save
   system vimrc file: $VIM/vimrc
 user vimrc file: $HOME/.vimrc
  user exrc file: $HOME/.exrc
  system gvimrc file: $VIM/gvimrc
user gvimrc file: $HOME/.gvimrc
system menu file: $VIMRUNTIME/menu.vim
  fall-back for $VIM: /home/elash1/usr/local//share/vim
Compilation: /usr/bin/gcc-3.3 -c -I. -Iproto -DHAVE_CONFIG_H
-DFEAT_GUI_MOTIF -DFUNCPROTO=15 -DNARROWPROTO 
-I/home/elash1/usr/local/include  -DDEBUG  -I/usr/X11R6/include
Linking: /usr/bin/gcc-3.3  -L/usr/X11R6/lib  
-L/home/elash1/usr/local/lib -L/usr/local/lib -o vim  -lXmu -lXext -lXm
-lncurses
  DEBUG BUILD

After it is installed i can run vim, but not vim -g, gvim , or vim and
then do a :gui with out it seg faulting.
Eddie


Where using the version you thought you were?  If you have multiple
 copies of vim installed in various places, it can get confusing.
 
  Perhaps it would help to run
 
 $ make test
 $ make install
 
 and check the second one for error messages.
 
 HTH   --Benji Fisher
 
 On Sun, Apr 16, 2006 at 11:35:34PM -0400, Eddie Ash wrote:
  I am running on debian sarge.  With the flag
prefix=/home/elash1/usr/local
  I have set the CFLAG to be -DDEBUG
  but when I run gdb it doesn't find the symbols :( any clue?
  I noticed if I don't do make install, it works fine.  But otherwise
gvim 
  doesn't work.
  
  I get the following when i do a backtrace within gdb
  Program recieved signal sigsegv, segmentaqtion fault.
  #0 0x65794f2f in ?? ()
  #1 0x400dd491 in XmWidgetGetBaselines () from /usr/lib/libXm.so.2
  #2 0x400f24ac in xmOptionLabelGadget () from /usr/lib/libxm.so.2
  
  Eddie
  
  
  Benji Fisher wrote:
  
  On Sun, Apr 16, 2006 at 04:53:42PM -0600, Edward Ash wrote:
   
  
  When I try to run gvim I get a 
  
  Vim: Caught deadly signal SEGV
  
  Vim: Finished
  
  
  I am able to run in console with out a problem.
  
  
  Is there anything I can do to help debug this?
 
  
  
  You could try compiling with the debugging flag set (-DDEBUG) and
  then run under gdb.  If you want others to try to reproduce the
problem,
  please tell us what OS you are running, where you get the vim source (I
  recommend ftp://ftp.vim.org/pub/vim/unstable/snapshot/ ) and how you
  compile it.
  
  Make sure you are running the version you think you are running:
  use a full path, try
  
  $ vim --version
  $ vim -g
  $ vim
  :gui
  
  and any other variations I may have missed.
  
  HTH--Benji Fisher
   
  
 
 

-- 



Can't compile gui version with xorg

2006-04-17 Thread Anthony Campbell
I want to compile vim6.4 for my recently upgraded xorg. This is because
the Debian packages all lack the help.txt file for some reason, even
though I've installed vim-doc.

But vim compiles without the gui (gtk version). Any way to get it to do
this?

Anthony
-- 
Anthony Campbell - [EMAIL PROTECTED] 
Microsoft-free zone - Using Linux Gnu-Debian
http://www.acampbell.org.uk (blog, book reviews, 
on-line books and sceptical articles)



Re: Can't compile gui version with xorg

2006-04-17 Thread Chris Allen
On 4/17/06, Anthony Campbell [EMAIL PROTECTED] wrote:
 I want to compile vim6.4 for my recently upgraded xorg. This is because
 the Debian packages all lack the help.txt file for some reason, even
 though I've installed vim-doc.

 But vim compiles without the gui (gtk version). Any way to get it to do
 this?

Make sure you've got the GTK development package, whatever it may be
called, installed.

HTH,
Chris Allen


Re: Can't compile gui version with xorg

2006-04-17 Thread Thomas Adam

--- Anthony Campbell [EMAIL PROTECTED] wrote:

 But vim compiles without the gui (gtk version). Any way to get it to do
 this?

Well, can you tell us what's in config.log?  I suspect you're missing some of
the GTK header files, since a normal ./configure will attempt to build the
X11/GUI component by default.

-- Thomas Adam



___ 
Switch an email account to Yahoo! Mail, you could win FIFA World Cup tickets. 
http://uk.mail.yahoo.com


Re: Can't compile gui version with xorg

2006-04-17 Thread Anthony Campbell
On 17 Apr 2006, Thomas Adam wrote:
 
 --- Anthony Campbell [EMAIL PROTECTED] wrote:
 
  But vim compiles without the gui (gtk version). Any way to get it to do
  this?
 
 Well, can you tell us what's in config.log?  I suspect you're missing some of
 the GTK header files, since a normal ./configure will attempt to build the
 X11/GUI component by default.
 
 -- Thomas Adam
 

I get this:

configure:2673: checking for X
configure:3532: checking if X11 header files can be found
configure:3543: gcc -c -g -O2conftest.c 15
configure:3537:22: error: X11/Xlib.h: No such file or directory
configure: failed program was:
#line 3536 configure
#include confdefs.h
#include X11/Xlib.h
int main() {

; return 0; }
configure:3744: checking --enable-gui argument
configure:4992: checking for X11/SM/SMlib.h
configure:5260: checking quality of toupper
configure:5270: gcc -o conftest -g -O2   -L/usr/local/lib conftest.c -lnsl  15
configure: In function 'main':
configure:5267: warning: incompatible implicit declaration of built-in function 
'exit'
configure: failed program was:
#line 5265 configure
#include confdefs.h


Perhaps it doesn't like xorg?

Anthony

-- 
Anthony Campbell - [EMAIL PROTECTED] 
Microsoft-free zone - Using Linux Gnu-Debian
http://www.acampbell.org.uk (blog, book reviews, 
on-line books and sceptical articles)



Re: Can't compile gui version with xorg

2006-04-17 Thread Chris Allen
On 4/17/06, Anthony Campbell [EMAIL PROTECTED] wrote:
 I've installed libgtk2.0-dev but that doesn't do it. Do you know exactly
 which are the packages required? I can't find any relevant.

Try along the lines of x11-dev.  I'm surprised Debian would let you
install the gtk development packaged without the headers upon which it
depends to be useful.

HTH,
Chris Allen


Re: Can't compile gui version with xorg

2006-04-17 Thread Anthony Campbell
On 17 Apr 2006, Chris Allen wrote:
 On 4/17/06, Anthony Campbell [EMAIL PROTECTED] wrote:
  I want to compile vim6.4 for my recently upgraded xorg. This is because
  the Debian packages all lack the help.txt file for some reason, even
  though I've installed vim-doc.
 
  But vim compiles without the gui (gtk version). Any way to get it to do
  this?
 
 Make sure you've got the GTK development package, whatever it may be
 called, installed.
 
 HTH,
 Chris Allen

I have.

Anthony

-- 
Anthony Campbell - [EMAIL PROTECTED] 
Microsoft-free zone - Using Linux Gnu-Debian
http://www.acampbell.org.uk (blog, book reviews, 
on-line books and sceptical articles)



Re: Can't compile gui version with xorg

2006-04-17 Thread Thor Andreassen
On Mon, Apr 17, 2006 at 04:29:30PM +0100, Anthony Campbell wrote:
 On 17 Apr 2006, Thomas Adam wrote:
  
  --- Anthony Campbell [EMAIL PROTECTED] wrote:
  
   But vim compiles without the gui (gtk version). Any way to get it to do
   this?
  
  Well, can you tell us what's in config.log?  I suspect you're missing some 
  of
  the GTK header files, since a normal ./configure will attempt to build the
  X11/GUI component by default.
 
 configure:2673: checking for X
 configure:3532: checking if X11 header files can be found
 configure:3543: gcc -c -g -O2conftest.c 15
 configure:3537:22: error: X11/Xlib.h: No such file or directory

The following is very Debian specific.

When you know the exact filename of the file you are looking for,
apt-file(1) is your friend.

$ apt-get install apt-file
$ apt-file update
$ apt-file search X11/Xlib.h

On my system (Unstable) the result is:
  /usr/X11R6/include/X11/Xlib.h

Can you confirm that /usr/X11R6/include/X11/Xlib.h exists?

[...]

-- 
with kind regards
Thor Andreassen


Re: patched ctags

2006-04-17 Thread Marc Chantreux

Hi Bram,

You're right : it works when i make my structure global.

thanks and regards!


I think that for a structure local to a function ctags doesn't store
information.  You would have to move it outside of the function.





Re: Can't compile gui version with xorg

2006-04-17 Thread Anthony Campbell
On 17 Apr 2006, Thor Andreassen wrote:
 On Mon, Apr 17, 2006 at 04:29:30PM +0100, Anthony Campbell wrote:
  On 17 Apr 2006, Thomas Adam wrote:
   
   --- Anthony Campbell [EMAIL PROTECTED] wrote:
   
But vim compiles without the gui (gtk version). Any way to get it to do
this?
   
   Well, can you tell us what's in config.log?  I suspect you're missing 
   some of
   the GTK header files, since a normal ./configure will attempt to build the
   X11/GUI component by default.
  
  configure:2673: checking for X
  configure:3532: checking if X11 header files can be found
  configure:3543: gcc -c -g -O2conftest.c 15
  configure:3537:22: error: X11/Xlib.h: No such file or directory
 
 The following is very Debian specific.
 
 When you know the exact filename of the file you are looking for,
 apt-file(1) is your friend.
 
 $ apt-get install apt-file
 $ apt-file update
 $ apt-file search X11/Xlib.h
 
 On my system (Unstable) the result is:
   /usr/X11R6/include/X11/Xlib.h
 
 Can you confirm that /usr/X11R6/include/X11/Xlib.h exists?
 
 [...]
 
 -- 
 with kind regards
 Thor Andreassen

It does not. It used to but I think it has been removed in the recent
upgrade to xorg7.0. Have you done this upgrade in the last 2 o2 3 days?

Anthony

-- 
Anthony Campbell - [EMAIL PROTECTED] 
Microsoft-free zone - Using Linux Gnu-Debian
http://www.acampbell.org.uk (blog, book reviews, 
on-line books and sceptical articles)



Re: folding wierdness

2006-04-17 Thread Yakov Lerner
On 4/17/06, Daniel Nogradi [EMAIL PROTECTED] wrote:
 I came across a strange problem, strange at least to me. I'm using vim
 6.3 on a linux box.

 The thing has to do with folding. If I type

 :setlocal foldmethod=expr
 :setlocal foldexpr=0

 then the foldlevel of every line should be zero. This I do just to
 make sure that the starting point is clear. After the above I do a

 :syn region myFold start='{' end='}' transparent fold
 :syntax sync fromstart
 :setlocal foldmethod=syntax

 in order to have everything folded between { and } as is useful for C
 coding. Now the strangeness is that this most of the time work,
 however if I'm jumping back and forth between different files in
 different windows (I use vim in a single xterm but have several :split
 and :vsplit windows) using tags then sometimes it breaks down and the
 whole file gets folded at the first function, that is after the first
 { everything is folded together although there are several other
 functions in the file with several { } pairs.

 What is not clear to me is that even if this happens then if I type
 all the commands above that should fix it, since with the first 2
 commands all folding related thing should be erased, shouldn't it?

Your  ':syntax' commands are not reset when you just retype them.
To reset your syntax commands, you need to add something
like this at the beginning of your sequence of commands:
   :syn clear | syn on
or
   :syn off | syn on

The 2nd point: I'm not sure if your 'syn region' accounts properly
for '{' inside comments/strings. Is it possible that '{' inside
comments or strings confuses it ? I'm not sure.

Yakov


Re: folding wierdness

2006-04-17 Thread Daniel Nogradi
 Your  ':syntax' commands are not reset when you just retype them.
 To reset your syntax commands, you need to add something
 like this at the beginning of your sequence of commands:
:syn clear | syn on
 or
:syn off | syn on

 The 2nd point: I'm not sure if your 'syn region' accounts properly
 for '{' inside comments/strings. Is it possible that '{' inside
 comments or strings confuses it ? I'm not sure.

Thanks a lot, adding ':syn off | syn on' helped and the messed up
folding got fixed. About your 2nd point, I'm equally not sure but
exactly for this reason I don't have { or } in comments and neither in
strings. So that should be okay. I'm still wondering why folding
breaks down at the first place. Since I suspect it has to do with the
interaction of different windows I always use setlocal as opposed to
set to make sure I'm only effecting the current window, this is
correct isn't it?


Re: Duplicate tags problem

2006-04-17 Thread Jason Aeschilman
 Jason Aeschilman wrote:

   [ about the same tag being found in two tags files ]
  
Bram Moolenaar wrote:
 First of all, it's recommended to upgrade to Vim 6.4.  It includes
many
 bugfixes.

 But that doesn't solve this specific problem.  I'll look into it.
   
Bram, did you have a chance to look at this yet?
  
   Yes.  It's not easy to figure out the full name of the file, so that
   duplicate matches can be removed.  I don't plan to do this for Vim 7.

Would you be willing to add an option in Vim 7 so that when it looks up a
match that it'll only consult the first tags file listed and if a match is
found, stop, else continue to the next tags file in the tags list?  It seems
by what the ctags author mentions in his FAQ that this was the way it worked
once upon a time.  I know that it worked this way in 6.2.457-1 (but then you
said that was a bug).

Does anyone else know if there is a setting to get the old behavior
back?  I simply want vim to look at only the local tags file and if
a
match is found to jump.  If and only if there is no match in the
local
tags file, it will consult the parent tags file, according to the
set
tags=tags;/ setting I have in my .vimrc.
  
   The very old behavior was in fact wrong in a few other ways, some
tags
   would not be found.  Thus you can't get this back, you were depending
on
   a bug.
 
  First of all, I appreciate the help from you and Brett Stahlman.  Thanks
for
  following up on this.  I'm a little confused though because in the help
it
  says this under *tags-option*:
 
  The next file in the list is not used when:
  - A matching static tag for the current buffer has been found.
  - A matching global tag has been found.
 
  So if my tag is indeed in the current tags file, why would it even
search
  the parent tags file?  Again, my tags setting is ctags=tags;/ as
suggested
  in Tip #94 [http://www.vim.org/tips/tip.php?tip_id=94].

 If you do :tag ID then the first found tag is used and Vim may not
 report the other tags, as in tag N of M.  But if you do :tselect Vim
 will find them all.

:tag ID and :tselect both return multiple matches for me.

  Even if I do ctags --file-scope=no -R in the parent directory and
ctags
  *.[ch] in my sub-directory and I'm in my sub-directory, still it does
not
  fix the problem.  I even changed my tags option to 'set
  tags=./tags;tags;~/code'.  These steps are part of the suggested
solution by
  the ctags author, Darren Hiebert, as described in the ctags FAQ
  [http://ctags.sourceforge.net/faq.html#15].  I believe this is what
Brett
  Stahlman was referring to.

 Whatever you set the 'tags' option to, you need to make sure tags appear
 in only one tags file.  If you use ../tags then you don't need a tags
 file in the current directory.

Sure, I can have one global tags file for my whole project heirarchy and set
my tags option to tags;/ and it'll work but then I have vim giving me
multiple matches when the same tag is found in several places.  I just
wanted to avoid that.  It's just frustrating that things worked as I wanted
in my old vim but not in the new one.  I'll try vim 6.4 and 7.0 and see how
they work.  Thanks for your help.



Re: folding wierdness

2006-04-17 Thread Yakov Lerner
On 4/17/06, Daniel Nogradi [EMAIL PROTECTED] wrote:
  Your  ':syntax' commands are not reset when you just retype them.
  To reset your syntax commands, you need to add something
  like this at the beginning of your sequence of commands:
 :syn clear | syn on
  or
 :syn off | syn on
 
  The 2nd point: I'm not sure if your 'syn region' accounts properly
  for '{' inside comments/strings. Is it possible that '{' inside
  comments or strings confuses it ? I'm not sure.

 Thanks a lot, adding ':syn off | syn on' helped and the messed up
 folding got fixed. ...  I'm still wondering why folding
 breaks down at the first place. Since I suspect it has to do with the
 interaction of different windows I always use setlocal as opposed to
 set to make sure I'm only effecting the current window, this is
 correct isn't it?

Well no, not really. Vim silently allows the :setlocal for for global-only
options. But although you use :setlocal form, the global
option will be set if the option is global-only option. To take an
example: 'bk' is global-only option. But if yuo try ':setlocal bk'
you get no error. I don't like this behavior, it's error-prone. As
a result, you might be changing global option thinking that you
change local option. The only way is to look into help for every
option to check whether it is local or global.

Yakov


Re: Can't compile gui version with xorg

2006-04-17 Thread Thor Andreassen
On Mon, Apr 17, 2006 at 06:01:23PM +0100, Anthony Campbell wrote:
 On 17 Apr 2006, Thor Andreassen wrote:
  On Mon, Apr 17, 2006 at 04:29:30PM +0100, Anthony Campbell wrote:
   On 17 Apr 2006, Thomas Adam wrote:

--- Anthony Campbell [EMAIL PROTECTED] wrote:

 But vim compiles without the gui (gtk version). Any way to get it to 
 do
 this?

Well, can you tell us what's in config.log?  I suspect you're missing 
some of
the GTK header files, since a normal ./configure will attempt to build 
the
X11/GUI component by default.
   
   configure:2673: checking for X
   configure:3532: checking if X11 header files can be found
   configure:3543: gcc -c -g -O2conftest.c 15
   configure:3537:22: error: X11/Xlib.h: No such file or directory
  
  The following is very Debian specific.
  
  When you know the exact filename of the file you are looking for,
  apt-file(1) is your friend.
  
  $ apt-get install apt-file
  $ apt-file update
  $ apt-file search X11/Xlib.h
  
  On my system (Unstable) the result is:
/usr/X11R6/include/X11/Xlib.h
  
  Can you confirm that /usr/X11R6/include/X11/Xlib.h exists?
  
  [...]
 
 It does not. It used to but I think it has been removed in the recent
 upgrade to xorg7.0. Have you done this upgrade in the last 2 o2 3 days?

No, I have not upgraded yet.

I am not sure, but this announcement might be related to your
problem:

http://lists.debian.org/debian-devel-announce/2006/04/msg00010.html

-- 
with kind regards
Thor Andreassen


Duplicate tags problem [SOLVED]

2006-04-17 Thread Jason Aeschilman
 Jason Aeschilman wrote:
 [ about the same tag being found in two tags files ]

Wow, if I use a comma instead of a semi-colon in my tags option, it will
stop searching through tags files if a match is found!  Before I had set
tags=tags;/ (see vim tip 94) but now I have set tags=tags,../tags and it
works.  I tried set tags=tags,/ but it will not search the tags file in
the parent directory like it does when semi-colon is used.  Now I guess if I
find myself more than one level deep, I'll have to set my tags option to
set tags=tags,../tags,../../tags,../../../tags like I did once upon a time
(before I came across the tags;/ tip).



Problems Closing The Quickfix Window

2006-04-17 Thread Tom Purl
os - Linux
vim - VIM - Vi IMproved 7.0d02 BETA
ant_menu - 0.5.4

I'm a bit of a newbie when it comes to quickfix, so any help you can give
me would be greatly appreciated.

I'm using vim with the ant_menu plugin, which integrates the Apache Ant
tool with vim.  Basically, by using the ,ttarget key combo, I can
execute a build.xml file and have its output redirected to a quickfix
window at the bottom of my screen.  So after executing the plugin, the
screen is split into two, with the quickfix screen at the bottom.

Naturally, if there's a problem uncovered by ant, I would like to close
the quickfix window so I can devote all of my screen to a single vim
window containing my code.  The problem is that I can't.  If I move the
cursor out of the quickfix window (it's in there by default after
executing ant_menu), then I can't put it back in there.  It's as if VI
doesn't know that the quickfix window exists.  Please note that I am *not*
asking how to move my cursor from window to window; I know how to do that.
 I just can't move it into the quickfix window after moving it out.

Well, naturally, if I can't navigate to the quickfix window, then I can't
close it.  Is this normal for quickfix?  Is there some other command that
I should use to navigate to the window?  Is there some quickfix-only
command for closing the window?

Thanks in advance for the help!

Tom Purl



Re: Problems Closing The Quickfix Window

2006-04-17 Thread Tom Purl
I forgot to mention that I also tested this in vim with the following vim
version and got the same results:

VIM - Vi IMproved 6.4 (2005 Oct 15, compiled Feb 12 2006 15:22:23)
Included patches: 1-7


Re: Problems Closing The Quickfix Window

2006-04-17 Thread Yakov Lerner
On 4/17/06, Tom Purl [EMAIL PROTECTED] wrote:
 os - Linux
 vim - VIM - Vi IMproved 7.0d02 BETA
 ant_menu - 0.5.4

 I'm a bit of a newbie when it comes to quickfix, so any help you can give
 me would be greatly appreciated.

 I'm using vim with the ant_menu plugin, which integrates the Apache Ant
 tool with vim.  Basically, by using the ,ttarget key combo, I can
 execute a build.xml file and have its output redirected to a quickfix
 window at the bottom of my screen.  So after executing the plugin, the
 screen is split into two, with the quickfix screen at the bottom.

 Naturally, if there's a problem uncovered by ant, I would like to close
 the quickfix window so I can devote all of my screen to a single vim
 window containing my code.  The problem is that I can't.  If I move the
 cursor out of the quickfix window (it's in there by default after
 executing ant_menu), then I can't put it back in there.  It's as if VI
 doesn't know that the quickfix window exists.  Please note that I am *not*
 asking how to move my cursor from window to window; I know how to do that.
  I just can't move it into the quickfix window after moving it out.

 Well, naturally, if I can't navigate to the quickfix window, then I can't
 close it.  Is this normal for quickfix?  Is there some other command that
 I should use to navigate to the window?  Is there some quickfix-only
 command for closing the window?

If you have only one non-quickfix window open, how
about :on! command issued while you are in the non-quickfix window ?
   :on!
See :he :only

Yakov


Re: Segv with gvim 7.d and 7.e

2006-04-17 Thread Edward Ash
Looks like it has something to do with the motif library that I used.
I tried changing to a different version of gcc to compile and that
didn't work.  I didn't have another motif library on my machine, but I
did find that I had GTK buried somewhere in a non default location and
used that.  Things started to work then.
Eddie

 
 Edward Ash wrote:
 
  I have tried the make test, and make install.  And both run with out any
  errors.
  When I do a vim --version i get the following:
  
  
Did you try the suggestions from my first reply to make sure you
   wIM - Vi IMproved 7.0e BETA (2006 Apr 16, compiled Apr 16 2006
23:19:30)
  Compiled by [EMAIL PROTECTED]
  Normal version with X11-Motif GUI.  Features included (+) or not (-):
  -arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset
+cindent
  +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
  +comments
  +cryptv -cscope +cursorshape +dialog_con_gui +diff +digraphs -dnd
-ebcdic
  -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
+find_in_path
  +folding -footer +fork() +gettext -hangul_input -iconv +insert_expand
  +jumplist
   -keymap -langmap +libcall +linebreak +lispindent +listcmds
+localmap +menu
  +mksession +modify_fname +mouse +mouseshape -mouse_dec -mouse_gpm
  -mouse_jsbterm -mouse_netterm +mouse_xterm -multi_byte +multi_lang
-mzscheme
  +netbeans_intg -osfiletype +path_extra -perl +postscript +printer
-profile
  -python +quickfix -rightleft -ruby +scrollbind +signs +smartindent
-sniff
  +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white
  -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands
  +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore
  +wildmenu +windows +writebackup +X11 +xfontset +xim +xsmp_interact
  +xterm_clipboard -xterm_save
 system vimrc file: $VIM/vimrc
   user vimrc file: $HOME/.vimrc
user exrc file: $HOME/.exrc
system gvimrc file: $VIM/gvimrc
  user gvimrc file: $HOME/.gvimrc
  system menu file: $VIMRUNTIME/menu.vim
fall-back for $VIM: /home/elash1/usr/local//share/vim
  Compilation: /usr/bin/gcc-3.3 -c -I. -Iproto -DHAVE_CONFIG_H
  -DFEAT_GUI_MOTIF -DFUNCPROTO=15 -DNARROWPROTO 
  -I/home/elash1/usr/local/include  -DDEBUG  -I/usr/X11R6/include
  Linking: /usr/bin/gcc-3.3  -L/usr/X11R6/lib  
  -L/home/elash1/usr/local/lib -L/usr/local/lib -o vim  -lXmu -lXext -lXm
  -lncurses
DEBUG BUILD
  
  After it is installed i can run vim, but not vim -g, gvim , or vim and
  then do a :gui with out it seg faulting.
 
 There are several possible causes:
 - GCC 3.3 has bugs.  Try using GCC 3.4.
 - Something in the Motif library.  Try using another Motif library.
 - If that all fails, try installing GTK.
 
 -- 
 ~
 ~
 ~
 .signature 4 lines, 50 characters written
 
  /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net
  \\\
 ///sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
 \\\download, build and distribute -- http://www.A-A-P.org
   ///
  \\\help me help AIDS victims -- http://www.ICCF.nl  
  ///
 
 

-- 



Adding a new jump to the list

2006-04-17 Thread Hari Krishna Dara

In my script, when the user presses an hyperlink, I open the file
corresponding to that link and move the cursor to the right location.
This for some reason is not treated as a new jump by Vim, so when the
user presses ^O, he doesn't go back to the old cursor position. Is there
a way to force the original location to go into jumplist before moving
the cursor?

-- 
Thanks,
Hari

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: Adding a new jump to the list

2006-04-17 Thread Yegappan Lakshmanan
Hi Hari,

On 4/17/06, Hari Krishna Dara [EMAIL PROTECTED] wrote:

 In my script, when the user presses an hyperlink, I open the file
 corresponding to that link and move the cursor to the right location.
 This for some reason is not treated as a new jump by Vim, so when the
 user presses ^O, he doesn't go back to the old cursor position. Is there
 a way to force the original location to go into jumplist before moving
 the cursor?


The taglist plugin handles this by explicitly setting the ' mark.

   mark '

- Yegappan


Re: Adding a new jump to the list

2006-04-17 Thread Hari Krishna Dara

On Mon, 17 Apr 2006 at 3:20pm, Yegappan Lakshmanan wrote:

 Hi Hari,

 On 4/17/06, Hari Krishna Dara [EMAIL PROTECTED] wrote:
 
  In my script, when the user presses an hyperlink, I open the file
  corresponding to that link and move the cursor to the right location.
  This for some reason is not treated as a new jump by Vim, so when the
  user presses ^O, he doesn't go back to the old cursor position. Is there
  a way to force the original location to go into jumplist before moving
  the cursor?
 

 The taglist plugin handles this by explicitly setting the ' mark.

mark '

 - Yegappan


Works nicely, thanks.

-- 
Hari

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Running :bufdo with eventignore=all

2006-04-17 Thread Hari Krishna Dara

In my script, I am running a :bufdo command with eventignore=all because
of two main reasons:
- performs better as I am not triggering any events.
- doesn't interfere with plugins that deal with MRU buffer lists.

This however leaves a side effect after the command is run. All the
buffer go into some weird state, as when I open each of the buffers,
they don't show up any syntax highlighting, and I have to explicitly
reload each of them. This happens for all buffers individually, so it
sometimes becomes a pain to reload them, and this starts all over if I
have to run the script again. Is this behavior expected or is it a bug?
Can I somehow workaround this?

Yes, I do save and restore the old value of 'eventignore' in a
try/finally block.

-- 
Thank you,
Hari

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: Duplicate tags problem [SOLVED]

2006-04-17 Thread Yegappan Lakshmanan
Hi Jason,

On 4/17/06, Jason Aeschilman [EMAIL PROTECTED] wrote:
  Jason Aeschilman wrote:
  [ about the same tag being found in two tags files ]

 Wow, if I use a comma instead of a semi-colon in my tags option, it will
 stop searching through tags files if a match is found!  Before I had set
 tags=tags;/ (see vim tip 94) but now I have set tags=tags,../tags and it
 works.  I tried set tags=tags,/ but it will not search the tags file in
 the parent directory like it does when semi-colon is used.  Now I guess if I
 find myself more than one level deep, I'll have to set my tags option to
 set tags=tags,../tags,../../tags,../../../tags like I did once upon a time
 (before I came across the tags;/ tip).


You can try using the following:

set tags=tags,tags;/

This uses the tags file from the current directory or searches for the
tags file from the current directory and in it's parent directories.

or

   set tags=tags,./tags;/

This uses the tags file from the current directory or searches for the
tags file from the directory of the current file and in it's parent
directories.

- Yegappan


Re: Running :bufdo with eventignore=all

2006-04-17 Thread Eric Arnold
This is because you are ignoring the filetype event.

Try a doautoall FileType when you're done.



On 4/17/06, Hari Krishna Dara [EMAIL PROTECTED] wrote:

 In my script, I am running a :bufdo command with eventignore=all because
 of two main reasons:
 - performs better as I am not triggering any events.
 - doesn't interfere with plugins that deal with MRU buffer lists.

 This however leaves a side effect after the command is run. All the
 buffer go into some weird state, as when I open each of the buffers,
 they don't show up any syntax highlighting, and I have to explicitly
 reload each of them. This happens for all buffers individually, so it
 sometimes becomes a pain to reload them, and this starts all over if I
 have to run the script again. Is this behavior expected or is it a bug?
 Can I somehow workaround this?

 Yes, I do save and restore the old value of 'eventignore' in a
 try/finally block.

 --
 Thank you,
 Hari

 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com



Re: Running :bufdo with eventignore=all

2006-04-17 Thread Hari Krishna Dara

On Mon, 17 Apr 2006 at 5:08pm, Eric Arnold wrote:

 This is because you are ignoring the filetype event.

 Try a doautoall FileType when you're done.


Thanks, this means I can use :bufdo doautocmd FileType syntax, because I
also use :windo and :argdo in place of :bufdo.

I still wonder why the subsequent opening of the buffers doesn't set
syntax just like it should while opening any buffer. There is obviously
some state that is left over from the time the buffer is loaded using
eventignore=all. I don't know which event is responsible for loading the
syntax highlighting (wasn't obvious from the files under vim directory),
but I believe that event is not getting triggered,  and I don't see a
reason why it shouldn't (since 'eventignore' is subsequently changed to
empty string). This could very well be a bug which is why I want to
understand this.

-- 
Thanks,
Hari



 On 4/17/06, Hari Krishna Dara [EMAIL PROTECTED] wrote:
 
  In my script, I am running a :bufdo command with eventignore=all because
  of two main reasons:
  - performs better as I am not triggering any events.
  - doesn't interfere with plugins that deal with MRU buffer lists.
 
  This however leaves a side effect after the command is run. All the
  buffer go into some weird state, as when I open each of the buffers,
  they don't show up any syntax highlighting, and I have to explicitly
  reload each of them. This happens for all buffers individually, so it
  sometimes becomes a pain to reload them, and this starts all over if I
  have to run the script again. Is this behavior expected or is it a bug?
  Can I somehow workaround this?
 
  Yes, I do save and restore the old value of 'eventignore' in a
  try/finally block.
 
  --
  Thank you,
  Hari
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam protection around
  http://mail.yahoo.com
 



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: How do I get rid of null characters?

2006-04-17 Thread Robert Hicks

Eric Arnold wrote:

You've gotta be careful about nulls.  Vim stores newlines (^J) as
nulls in some cases, so you might be getting rid of more than you
wanted.



Thanks for the warning. I only want to do this for one file that I have 
so I am not going to permanently add it to my .vimrc.


Robert