On 08/03/2012 09:03 AM, Tony Mechelynck wrote:
On 03/08/12 15:09, richard emberson wrote:
7.3 system vimrc:
    system vimrc file: "$VIM/vimrc"
      user vimrc file: "$HOME/.vimrc"
       user exrc file: "$HOME/.exrc"
   fall-back for $VIM: "/usr/local/share/vim"

7.2.556 system vimrc:
    system vimrc file: "/etc/vimrc"
      user vimrc file: "$HOME/.vimrc"
       user exrc file: "$HOME/.exrc"
   fall-back for $VIM: "/etc"
  f-b for $VIMRUNTIME: "/usr/share/vim/vim73"

Aha! And what are the differences between /etc/vimrc and
/usr/local/share/vim/vimrc (an absent file being regarded as empty)?


Best regards,
Tony.
There is no /usr/local/share/vim/vimrc.

Turns out there are also issues with 7.3.556.
I am tring to write out the lines:
  "Click a button to run Form."
  "Remember, entering <ESC> lets you exit any Form."
  "Navigate using <Tab>, <S-Tab>, <C-P> and <C-N>."
  "Also, navigate using <LeftMouse> and <ScrollWheelUp/Down>."
  "Select a button using <CR>, <Space>, of <LeftMouse>"

calling SetStringAt(str, line, column)

into a window area which is filled left-to-right, top-to-bottom with,
lets say, random characters. Some of the characters written may be multi-byte.

If I use:

function! SetStringAt(str, line, column)
  let s = a:str
  let slen = strchars(s)
  exe a:line
  let c = a:column
  exe "norm! 0".(c-1)."l".slen."s".s.''
endfunction

I get, well, unexpected output because of the '<' and/or '>' in the text.

But if I use:

function! SetCharAt(chr, line, column)
  exe a:line
  if a:column <= 1
    exe "norm! 0r".a:chr
  else
    exe "norm! 0".(a:column-1)."lr".a:chr
  endif
endfunction

function! SetStringAt(str, line, column)
  let s = a:str
  let slen = strchars(s)
  let cnt = 0
  while cnt < slen
    call SetCharAt(s[cnt], a:line, a:column+cnt)
    let cnt += 1
  endwhile
endfunction

Then everything is written to the window as expected.

So, I fear, there was something wrong with my first approach.

Thanks for your help.
Richard

--
Quis custodiet ipsos custodes

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to