Re: Visible Spaces

2006-07-23 Thread Jason Weber
> On Fri 21-Jul-06 12:51pm -0600, Jason Weber wrote:
>
>>> Ah, that's an idea.  Just "/ " to search for spaces (assumes
>>> highlighting's turned on), and they'll all be highlighted.  He wants to
>>> turn off highlighting, just "/qqq" or something.
>
>> I prefer "/;;" to turn off highlighting. the keys are right next to each
>> other and never happen in any languages I use.
>
> I clear the last search pattern often enough that I use a
> mapping:
>
>   map \ :let @/=""echo "Search pattern cleared"
>
> --
> Best regards,
> Bill
>

[Hmm, attachments are rejected.  Trying again...]

Ah, very nice, 2 taps beats my four, or six for :noh.

For my previous mail, note that, as best I can tell, 'contained' is
broken by the use of 'contains=ALLBUT,...' in various other syntax files
like C and C++ (please tell me how I'm mistaken).  I have a
clean_cpp.vim I use to switch to 'contains=TOP' instead.

Anyhow, for kicks I've extended my odd_space.vim to show spaces that
aren't tab aligned by 4.  These are recent changes, so I haven't perused
a lot of source to see if it causes any odd corner cases.

-- Jason Weber

clean_cpp.vim:
" override ALLBUT to TOP to prevent exposing all 'contained'

syn clear   cParen
syn clear   cCppParen
syn region  cParen  transparent start='(' end=')'
contains=TOP,@cParenGroup,cCppParen,cCppString,@Spell
syn region  cCppParen   transparent start='(' skip='\\$' 
excludenl end=')'
end='$' contained contains=TOP,@cParenGroup,cParen,cString,@Spell

syn clear   cBracket
syn clear   cCppBracket
syn region  cBrackettransparent start=/\[\|<::[EMAIL 
PROTECTED]/ end=/]\|:>/ 
contains=TOP,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell
syn region  cCppBracket transparent start=/\[\|<::[EMAIL 
PROTECTED]/ skip=/\\$/ end=/$/
end=/]\|:>/  contained excludenl
contains=TOP,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell

syn clear   cDefine
syn clear   cMulti
syn clear   cPreProc
syn region  cDefine 
start=/^\s*\(%:\|#\)\s*\(define\|undef\)\>/
skip=/\\$/ end=+//+me=s-1 end=/$/  contains=TOP,@cPreProcGroup,@Spell
syn region  cMulti  transparent start=/?/ skip=/::/ end=/:/ 
contains=TOP,@cMultiGroup,@Spell
syn
region  cPreProc
start=/^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)/
skip=/\\$/ end=/$/  keepend contains=TOP,@cPreProcGroup,@Spell


odd_space.vim:

syn match   newtab  "[\t]\+$" containedin=ALL
syn match   spacereturn "[ ]$" contained
syn match   freespace   "[ ]\+$" containedin=ALL 
contains=spacereturn
syn match   spacetab"[ ]\t"me=e-1 containedin=ALL
syn match   tabspace"\t[ ]\+"lc=1 containedin=ALL
syn match   tabtab  "[ -'*-Z^-z|~]\t\t\t*[ 
-'*-.0-Z^-z|~]"lc=1,me=e-1
containedin=ALLBUT,cComment,loudmatch

syn match   onespace"[ ]" contained
syn match   twospace"[ ][ ]"he=e-1 contained
nextgroup=offspace,twospace,onespace
syn match   midspace"[^ ][ ]\{2,}[^ ]"lc=1,me=e-1 
contains=offspace
syn match   offspace"[ ]\+\%>01v[^ ]\%<06v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace"[ ]\+\%>05v[^ ]\%<10v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace"[ ]\+\%>09v[^ ]\%<14v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace"[ ]\+\%>13v[^ ]\%<18v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace"[ ]\+\%>17v[^ ]\%<22v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace"[ ]\+\%>21v[^ ]\%<26v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace"[ ]\+\%>25v[^ ]\%<30v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace"[ ]\+\%>29v[^ ]\%<34v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace"[ ]\+\%>33v[^ ]\%<38v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace"[ ]\+\%>37v[^ ]\%<42v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace"[ ]\+\%>41v[^ ]\%<46v"me=e-1,hs=e-1 
contained
contains=twospace
syn match   offspace

RE: Visible Spaces

2006-07-21 Thread Jason Weber
>> Would you be satisfied with changing the background color for
>>spaces?  Step 1:
>
> Ah, that's an idea.  Just "/ " to search for spaces (assumes
> highlighting's turned on), and they'll all be highlighted.  He wants to
> turn off highlighting, just "/qqq" or something.
>
>
> Else maybe tweak the font to change space to ยท or something.
> Thing is, change the font to something else, and that goes away, and
> he'd have to tweak the font for that as well.
>
> Eg, if he's using Lucida console 10pt, make a copy of the font, rename
> to something else ("Lucidaspace" or whatever), edit the font to change
> the space char, then when you want visispaces, just font your way to
> that.  Want invisispaces again, change back to the normal Lucida font.


I prefer "/;;" to turn off highlighting. the keys are right next to each
other and never happen in any languages I use.

For spaces, maybe not exactly the same thing, but I have a .vim to color
every three out of four leading spaces as magenta underline (in a
non-expandtab file).  The file also points out a lot of other spacing issues.

Activate this anywhere that doesn't have a strict real-tab rule and
you'll see all the inconsistancies light up.  The blue underlines
between words are ok and just there to help line up widely spaced tables.
I should probably add something to ignore the two spaces between
sentences in prose.

odd_space.vim:

syn match   newtab  "[\t]\+$" containedin=ALL
syn match   spacereturn "[ ]$" containedin=ALL
syn match   spacetab"[ ]\t"me=e-1 containedin=ALL
syn match   tabspace"\t[ ]\+"lc=1 containedin=ALL
syn match   tabtab  "[ -'*-Z^-z|~]\t\t\t*[ 
-'*-.0-Z^-z|~]"lc=1,me=e-1
containedin=ALLBUT,cComment
syn match   leadspace   "[ ][ ]"lc=1 contained
syn match   pairspace   "[ ][ ]"hs=s+1 contained 
nextgroup=pairspace,leadspace
syn match   quadspace   "[ ][ ][ ][ ]"hs=s+1 contained
nextgroup=quadspace,pairspace,leadspace
syn match   pairstart   "^[ ][ ]"hs=s+1 
nextgroup=quadspace,pairspace,leadspace
syn match   quadstart   "^[ ][ ][ ][ ]"hs=s+1
nextgroup=quadspace,pairspace,leadspace
syn match   spaces  "[^ ][ ]\{2,}"lc=1

hi spacetab ctermfg=Red guifg=red   
gui=underline   cterm=underline
hi tabspace ctermfg=Red guifg=red   
gui=underline   cterm=underline
hi spacereturn  ctermfg=Red guifg=red   
gui=underline   cterm=underline
hi newtab   ctermfg=Blueguifg=#FF   gui=underline   
cterm=underline
hi tabtab   ctermfg=Blueguifg=#88   gui=underline   
cterm=underline

if &expandtab == 0
hi quadspacectermfg=Magenta guifg=#440044   gui=underline   
cterm=underline
else
hi link quadspace   Normal
endif
hi  linkpairstart   pairspace
hi  linkquadstart   quadspace

hi spaces       ctermfg=DarkRed guifg=#55   gui=underline   
cterm=underline

hi pairspacectermfg=Yellow  guifg=#00   gui=underline   
cterm=underline
hi link leadspace   pairspace

-- 
  _
 ( \  _  \/_ /  _ _  Jason Weber  Glendale, CA
  \|(\/)()))  \/\/(-/_)(-/(  http://www.imonk.com/baboon  [EMAIL PROTECTED]
  //  [EMAIL PROTECTED]
 (/



iconstring (addendum)

2006-07-19 Thread Jason Weber
> I can not get iconstring to work.  The WM_ICON_NAME is always the
> same as WM_NAME.
>
> % vim -g --version
> VIM - Vi IMproved 7.0 (2006 May 7, compiled May  8 2006 13:24:06)
> Compiled by [EMAIL PROTECTED]
> Normal version with GTK 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 +reltime -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: "/usr/local/share/vim"
> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
> -I/usr/include/gtk-1.2
> +-I/usr/include/glib-1.2 -I/usr/lib64/glib/include -I/usr/X11R6/include
> -g -O2  -I/usr/X11R6/include
> Linking: gcc  -L/usr/X11R6/lib64   -L/usr/local/lib -o vim   -L/usr/lib64
> -L/usr/X11R6/lib64 -lgtk -lgdk
> +-rdynamic -lgmodule -lglib -lXi -lXext -lm -lXt -lncurses -lacl -lgpm
>
> :set
> --- Options ---
>   background=dark formatoptions=qlmouse=nvc   syntax=vim
>wildmenu
>   cmdheight=2 guioptions=almiepreviewheight=8 tabstop=4
>window=87
>   comments=   helplang=en scroll=17   textwidth=78
>   commentstring="%s   hlsearchscrolloff=5 title
>   filetype=vimiconshiftwidth=4titlelen=0
>   foldlevel=16incsearch   showfulltag ttyfast
>   backspace=indent,eol,start
>   completeopt=menu,longest
>   guifont=Monospace 8,lucidasanstypewriter-12,Lucida_Console:h9:cANSI
>   iconstring=%t%m%m%m%r
>   makeprg=cd $FE_ROOT;python $FE_ROOT/bin/forge.py -j 2 here\|sed -ue
> "s/^[[^m]*m//g"
>   path=.,/usr/include$FE_ROOT/**
>   tags=./tags,tags,$FE_ROOT/tags
>   titlestring=%m%t - VIM %F
>
>
> % xprop
> [...]
> WM_ICON_NAME(STRING) = ".vimrc - VIM ~/.vimrc"
> WM_NAME(STRING) = ".vimrc - VIM ~/.vimrc"
>
> In this case, I would have liked to have an icon name of ".vimrc" and a
> title of "VIM ~/.vimrc", but since I can only get one, I jammed them
> together.
>
> This is manually compiled on Red Hat.  On another box, I get similar
results
> on an emerge with Gentoo, which uses version 6.4.
>
> --
>   _
>  ( \  _  \/_ /  _ _  Jason Weber  Glendale, CA
>   \|(\/)()))  \/\/(-/_)(-/(  http://www.imonk.com/baboon  [EMAIL PROTECTED]
>   //  [EMAIL PROTECTED]
>  (/


One more detail.  It works fine in non-gui mode.  It's just in -g or
gvim mode that the iconstring appears to be unrecognized.  I'd just
like to know if there is some compile option that I'm missing or
if maybe X11 iconstring support isn't actually implemented.

-- Jason Weber



Re: posting to vim

2006-07-18 Thread Jason Weber
> Jason Weber wrote:
>> Can one of you regular posters tell my how I can successfully
>> post to [EMAIL PROTECTED]  I tried my regular email, as well as the
>> exact email I receive postings on.  I also reapplied for a
>> new account on the same address and posted again.  I still
>> don't see anything showing up on the list.
>>
>> Does anyone dredge the spam folder looking for problems with
>> good honest well-meaning posters?
>>
>> Do you have to pay to post?  Would it help?
>>
>
> No, you don't have to pay, but you have to have a valid email address
> and to mention it in the "From" field of emails sent from that same
> address.
>
> Subscribing to the list is a process consisting of the following steps:
>
> 1. Send an email (whose "body") may be blank to [EMAIL PROTECTED]
>
> 2. The vim-list robot will reply to whatever address was on the "From"
> line of the email sent at step 1 (so that address had better be yours),
> giving you further instructions on how to finalize your subscription.
> (This avoids the case where someone would "subscribe" you against your
> will.) You should obey the instructions in that email. Shortly after you
> do, the list posts should start arriving (and they are quite frequent:
> don't mistake this "flooding" of your mailbox for spam; after all, you
> requested it and confirmed that it was you).
>
> If "someone" filters your incoming email, sending mail arriving from the
> Vim list to the trash bin before you see it, then I guess you should
> either make your spam filters less strict (possibly by complaining to
> whoever is responsible for setting the filters), or if you can't, take a
> different email address. You might even try something that you can read
> by webmail (i.e., by using a web browser, not a mail client: e.g.
> @netscape.net, @yahoo.co.uk, etc.) so you can bypass all filters
> including those built into your company's mail routers.
>
> For more details, browse to http://www.vim.org/ and click "Community" in
> the left margin.
>
>
> Best regards,
> Tony.

Assuming this works, I've found my problem.  I was receiving vim
postings through an alias [EMAIL PROTECTED] while I always send
from [EMAIL PROTECTED]  I re-subscribed and noticed the difference
in the header of a duplicate message.

As for the spam folder, I meant does anyone admin'ing the list
look through the rejects to see if anyone is making honest
mistakes?  Imagining the mountains of spam that must come through,
I'm guessing no.  That's ok.

No complaints, now that I see what's going on.

-- Jason Weber




iconstring

2006-07-18 Thread Jason Weber
I can not get iconstring to work.  The WM_ICON_NAME is always the
same as WM_NAME.

% vim -g --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled May  8 2006 13:24:06)
Compiled by [EMAIL PROTECTED]
Normal version with GTK 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 +reltime -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: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-I/usr/include/gtk-1.2
+-I/usr/include/glib-1.2 -I/usr/lib64/glib/include -I/usr/X11R6/include
-g -O2  -I/usr/X11R6/include
Linking: gcc  -L/usr/X11R6/lib64   -L/usr/local/lib -o vim   -L/usr/lib64
-L/usr/X11R6/lib64 -lgtk -lgdk
+-rdynamic -lgmodule -lglib -lXi -lXext -lm -lXt -lncurses -lacl -lgpm

:set
--- Options ---
  background=dark formatoptions=qlmouse=nvc   syntax=vim
   wildmenu
  cmdheight=2 guioptions=almiepreviewheight=8 tabstop=4
   window=87
  comments=   helplang=en scroll=17   textwidth=78
  commentstring="%s   hlsearchscrolloff=5 title
  filetype=vimiconshiftwidth=4titlelen=0
  foldlevel=16incsearch   showfulltag ttyfast
  backspace=indent,eol,start
  completeopt=menu,longest
  guifont=Monospace 8,lucidasanstypewriter-12,Lucida_Console:h9:cANSI
  iconstring=%t%m%m%m%r
  makeprg=cd $FE_ROOT;python $FE_ROOT/bin/forge.py -j 2 here\|sed -ue
"s/^[[^m]*m//g"
  path=.,/usr/include$FE_ROOT/**
  tags=./tags,tags,$FE_ROOT/tags
  titlestring=%m%t - VIM %F


% xprop
[...]
WM_ICON_NAME(STRING) = ".vimrc - VIM ~/.vimrc"
WM_NAME(STRING) = ".vimrc - VIM ~/.vimrc"

In this case, I would have liked to have an icon name of ".vimrc" and a
title of "VIM ~/.vimrc", but since I can only get one, I jammed them
together.

This is manually compiled on Red Hat.  On another box, I get similar results
on an emerge with Gentoo, which uses version 6.4.

--
  _
 ( \  _  \/_ /  _ _  Jason Weber  Glendale, CA
  \|(\/)()))  \/\/(-/_)(-/(  http://www.imonk.com/baboon  [EMAIL PROTECTED]
  //  [EMAIL PROTECTED]