Japanese interface for vim7 in freebsd 6.1

2006-11-17 Thread vuthecuong

Does anyone is using vim7 on freebsd?

When install vim7 from ports, which install option will make vim7 interface
become japanese?
Thanks in advanced


Re: Japanese interface for vim7 in freebsd 6.1

2006-11-17 Thread A.J.Mechelynck

vuthecuong wrote:

Does anyone is using vim7 on freebsd?

When install vim7 from ports, which install option will make vim7 interface
become japanese?
Thanks in advanced



Vim (compiled with +multi_byte +multi_lang etc.) should start up in Japanese 
with no particular user intervention if the system locale is Japanese.


If the system locale is _not_ Japanese, you should still be able to get 
Japanese menus and messages in gvim by using language messages jp_JP (or 
something) at the very top of your vimrc (just after set nocompatible if 
that is your first line, before sourcing the vimrc_example if you do, before 
filetype plugin on and/or syntax on if you use them). Of course you would 
also need to set 'encoding' to some value compatible with Japanese text.


Note that it's better to use a recent bugfixed build, because some of the 
fixes are for proper display of CJK menus. The latest version (AFAIK) is 
7.0.164 and the table of contents of the bug fixes can be read at 
http://ftp.vim.org/pub/vim/patches/7.0/README



Best regards,
Tony.


Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread Charles E Campbell Jr

Meino Christian Cramer wrote:


From: Charles E Campbell Jr [EMAIL PROTECTED]
Subject: Re: Commenting out TeX-text line by line in V-mode
Date: Thu, 16 Nov 2006 13:34:16 -0500
 


How about

:[range]g/\S/s/^/%/

which means:  over the selected range (which may be the visual range), 
on all lines that

have some non-white-space character on them, insert a leading %.
   



OK, here's a more detailed explanation:

:[range]   over the selected lines, which with visual selection 
will appear as ',' .

  Those are marks set by the visual selection.
g/pattern/cmd for any lines which match the given pattern, in this 
case \S , do the specified cmd.
  So, the cmd is performed for any line that has a 
non-whitespace character in it.
  Thus, empty lines and lines with just whitespace 
(tabs and spaces) will not match.


Now, the aforementioned cmd is

 s/^/%/   Substitute a % at the beginning of the current line.

What you asked for was to do something (comment out lines) given a 
condition (that the line must not be empty).   So the :g/pattern/cmd 
allows one to do a command (s/^/%/) only when the line matched a pattern 
(that implied that the line was not empty).


Regards,
Chip Campbell





Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread A.J.Mechelynck

Charles E Campbell Jr wrote:

Meino Christian Cramer wrote:


From: Charles E Campbell Jr [EMAIL PROTECTED]
Subject: Re: Commenting out TeX-text line by line in V-mode
Date: Thu, 16 Nov 2006 13:34:16 -0500
 


How about

:[range]g/\S/s/^/%/

which means:  over the selected range (which may be the visual 
range), on all lines that

have some non-white-space character on them, insert a leading %.
  


OK, here's a more detailed explanation:

:[range]   over the selected lines, which with visual selection 
will appear as ',' .

  Those are marks set by the visual selection.
g/pattern/cmd for any lines which match the given pattern, in this 
case \S , do the specified cmd.
  So, the cmd is performed for any line that has a 
non-whitespace character in it.
  Thus, empty lines and lines with just whitespace (tabs 
and spaces) will not match.


Now, the aforementioned cmd is

 s/^/%/   Substitute a % at the beginning of the current line.

What you asked for was to do something (comment out lines) given a 
condition (that the line must not be empty).   So the :g/pattern/cmd 
allows one to do a command (s/^/%/) only when the line matched a pattern 
(that implied that the line was not empty).


Regards,
Chip Campbell


It should be possible (though less obvious) to do it with only a substitute. 
Let's try:


:','s/^.*\S.*$/# \0

i.e. prepend a hash sign and a space wherever we find start-of-line, zero or 
more of anything, one nonblank, zero or more of anything, end-of-line (in the 
range, here shown as a Visual area).



Best regards,
Tony.


Re: yank and put 'over' instead of 'insert'

2006-11-17 Thread Charles E Campbell Jr

Troy Piggins wrote:


I use 'R' replace mode when doing, for example, ascii art etc
because it allows me to change characters without affecting the
layout of the rest of the window/page.

But if I want to yank a section using visual or visual block, is
there a way to put 'p' that block in without affecting the
layout?  The way I've been doing it, the rest gets pushed along.

 


The DrawIt plugin supports this sort of thing.  Here's the procedure:

visual-block select some region  and save into register a (ctrl-v move ay)

move cursor (upper left hand corner based) :  \pa
or, move cursor and click shift-leftmouse

Actually, DrawIt supports \pa ... \pz for all 26 marks, and that's a 
space-transparent put.

If you want the spaces to be used, use \ra ... \rz.

To get an up-to-date version of DrawIt, you'll also need to get an 
up-to-date version of vimball.  So:


1) Get an up-to-date version of vimball:
http://vim.sourceforge.net/scripts/script.php?script_id=1502
 -or-   http://mysite.verizon.net/astronaut/vim/index.html#VimBall
 (the mysite.verizon.net one will be the more recent version)

2) Remove the old vimball plugin and install the new one:

   Linux:
   cd /usr/local/share/vim/vim70
   /bin/rm plugin/vimball*.vim autoload/vimball*.vim doc/pi_vimball.txt
   mv (wherever it was downloaded)/vimball.tar.gz .
   gunzip vimball.tar.gz
   tar -xvf vimball.tar

   Windows:
   Under Windows, check your runtimepath to determine where your 
vim 7.0's runtime directories are:


   vim
   :echo rtp
   :q

   The first directory is likely your personal plugins directory, 
the second one is your vim system directory.


   cd (to your vim system directory)
   del plugin\vimballPlugin.vim
   del autoload\vimball.vim
   del doc\pi_vimball.txt
   ren (wherever)\vimball.tar.gz vimball.tar.gz
   gunzip vimball.tar.gz
   tar -xvf vimball.tar


3) Get DrawIt:
  http://vim.sourceforge.net/scripts/script.php?script_id=40
  http://mysite.verizon.net/astronaut/vim/index.html#DRAWIT

4) Install an up-to-date version of Drawit:
  vim DrawIt.vba.gz
  :so %
  :q

Steps 12 are all about updating vimball; in the future, whenever 7.1 
comes out, that complication will no longer be necessary.


Regards,
Chip Campbell



Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread Charles E Campbell Jr

A.J.Mechelynck wrote:



It should be possible (though less obvious) to do it with only a 
substitute. Let's try:


:','s/^.*\S.*$/# \0

i.e. prepend a hash sign and a space wherever we find start-of-line, 
zero or more of anything, one nonblank, zero or more of anything, 
end-of-line (in the range, here shown as a Visual area).



OK, here's another possible but less obvious method, even a bit shorter:

:','s/^.*\S\^/%/

This one uses a concat, and depends on having the last concat be the 
one used for substitution.

What it means:

:','  over the visually selected range
s   substitute the pattern that begins with something but has a 
non-whitespace character,

AND matches the beginning-of-line

with a % in the place of the last concat (ie. the beginning-of-line).

Regards,
Chip Campbell



splits count

2006-11-17 Thread chak

How can i limit maximum splits number?
How can i enable lines numeration by default?

i'm using RExplorer plugin, and each new file is opened in new window and
without lines numeration :(

ps: RExplorer is cool
-- 
View this message in context: 
http://www.nabble.com/splits-count-tf2655682.html#a7407629
Sent from the Vim - General mailing list archive at Nabble.com.



Re: Problem with Quickfix and Latex

2006-11-17 Thread Benji Fisher
On Thu, Nov 16, 2006 at 06:33:07PM -0200, Luis A. Florit wrote:
 Pals,
 
 I have a recurrent problem with quickfix and Latex. I use the
 tex.vim compiler by Srinath Avadhanula. I tried both the 2003 version
 contained in the last LatexSuite plugin
 
 http://www.vim.org/scripts/script.php?script_id=475
 
 and version '2006-03-20 09:45:45Z'. Same result.
 
 The problem:  After make, when there is an error, it jumps to an
 unwanted file. This is so because the efm variable is not correctly set.
 
 For example, after deleting a '$' in a file 'file.tex' and doing
 make, I read this in the quickfix window:
 
 ##
 || ) (./file.aux)
 /usr/share/texmf/tex/generic/xypic/xy.sty| error| Missing $
 inserted. $ \lambda =1$) and identifying the upper $2\times 2$ matrix in
 ##
 
 Then, a new buffer is loaded with the file xy.sty, and vim tries
 to go to the line  in that line (then it goes to the last).
 
 It seems that the problem is that the string
 '/usr/share/texmf/tex/generic/xypic/xy.sty' was not deleted by efm.
[snip]

 I never looked at the 'errorformat' option until a few weeks ago,
when I tried (with less than perfect success) to come up with a good
setting for plain TeX.  So I think I am not the most qualified person to
deal with this.  I hope someone else will take a stab at it.

--Benji Fisher


Re: using :ha under linux

2006-11-17 Thread Marlin Unruh

Benji Fisher wrote:

On Thu, Nov 16, 2006 at 12:05:31PM -0700, Marlin Unruh wrote:
[snip]

I can print to the printer from OpenOffice or any other program but Vim.

I get E365: Failed to print PostScript File.

I can't remember what I did once awhile back and it worked. I entered 
something like :set printdevice=lp0 and it worked. I checked the cmd 
history list but I can't find what cmd I used that time.


 Since you got an error message, read

:help E365

This one is related to the 'printexpr' option, so what does

:verbose set printexpr?

tell you?

HTH --Benji Fisher



Benji,

:verbose set printexpr? give the following, all in one line.

printexpr=system('lpr' . (printdevice == '' ? '' : ' -p' . 
printdevice) . ' ' . v:fname_in) . delete(v:fname_in + v:shell_error


Is this any help?

--
 Marlin


Re: using :ha under linux

2006-11-17 Thread A.J.Mechelynck

Marlin Unruh wrote:
[...]

Benji,

:verbose set printexpr? give the following, all in one line.

printexpr=system('lpr' . (printdevice == '' ? '' : ' -p' . 
printdevice) . ' ' . v:fname_in) . delete(v:fname_in + v:shell_error


Is this any help?



There is an unmatched parenthesis near the end of that expression. Other than 
that, I'm not sure.



Best regards,
Tony.


Re: splits count

2006-11-17 Thread chak



A.J.Mechelynck wrote:
 
 How can i enable lines numeration by default?
 
   :set number  in your vimrc
 

set nu is in gvimrc :(

here screenshot:

http://img174.imageshack.us/img174/1125/shotza0.png

if vim is starting without RExplorer - all ok, rows numbers is enabled

...possible, it's a bug of RExplorer, i'll try to fix it

may be last - how can i disable auto-editing mode?
exmplanation:
- when vim started first time, two windows is opened - RExplorer and editing
window (empty)
- i can easy to switch between them without leaving command mode
- but, when i pushing Insert, i'm switching vim into editing mode
! switching between splitted windows is left by the editor in a mode of an
insert
! Ctrl-O - switch vim into command mode. Arrows - move cursor, and
_switch_into_insert_mode_
Switching in a mode of an insert should be carried out only on Insert!!! :(

here is my config:
http://www.nabble.com/file/4214/_gvimrc _gvimrc 
-- 
View this message in context: 
http://www.nabble.com/splits-count-tf2655682.html#a7415325
Sent from the Vim - General mailing list archive at Nabble.com.



Can somebody move my cursor?

2006-11-17 Thread Zdenek Sekera

Hi,

this code is heavily influenced by vim.org tip #1363 getchar trick
using recursive expr map by Hari Krishna Dara. Clever code.
The code has also been posted on vim-dev recently. I just reworked
it a bit to understand it better.

-
imap buffer silent expr F12 Double(\F12)
function! Double(mymap)
  let char = GetChar()
  if char ==\Esc
  return \Esc.\C-R=Redraw()\CR
  return \Esc
  else
  return char.\C-R=Redraw()\CR.a:mymap
  endif
endfunction

function! Redraw()
  redraw
  return ''
endfunction

function! GetChar()
  try
let char = getchar()
 catch Interrupt C-C and convert it into Esc
  catch /^Vim:Interrupt$/
let char = \Esc
  finally
try
  throw char
 If the character typed is a number, convert it to character
  catch '^\d\+$'
let char = nr2char(char)
  finally
 Return whatever was typed, or converted
return char
endtry
  endtry
  return char
endfunction


To execute:
- source it in
- go to Insert mode (a, i, o, ...) and start typing, observe that
  the cursor is inside the window at the place where the next typed-in
  char will be put (important).
- now hit F12, the cursor will move to the bottom of the window
  and stay there but continue typing and characters will be placed
  correctly in the window. (Hit Esc to get out of INSERT.)

Hence my question: how to move the cursor to the position as if
one was in the normal INSERT mode?

Thanks and regards,

---Zdenek


smime.p7s
Description: S/MIME Cryptographic Signature