Author Topic: Vim And .vimrc  (Read 5146 times)

climber

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Vim And .vimrc
« on: January 17, 2006, 03:45:27 am »
I´ve flashed my SL-C3100 with the actuall Cacko 1.23 ROM. Up to now everythink works good. For editing data I installed the following version of vim "vim_6.1_arm.ipk". The installation wasn´t a problem. Now, i want to enable the syntax hightlighting and for that i heard that i have to copy the .vimrc to my home directory. I cant´t find a .vimrc anywhere on my zaurus. Another guy sayd that you have to run vimtutor and one of this process  involves coppying a sample .vimrc file to your home directory. Where and how should i run vimtutor. I execute this on the shell, but with no effect.

Could anybody help me to solve this problem!?  

Thanks,
climber

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
Vim And .vimrc
« Reply #1 on: January 17, 2006, 06:59:34 am »
I'm curently usinig OZ, not Cacko, but I downloaded the latest vim from the ZUG's Cacko feed (6.3, not sure where you got yours). There's a sample vimrc in the file /usr/share/vim/vim63/vimrc_example.vim, so I'd imagine there should be the same file in the verision directory of your package. Copy this file to ~/.vimrc & you should be good to go (other than what's below).

I noticed that this file (in 6.3) has a special check to turn syntax highlighting on only if you have a color terminal, but I'm not sure if the terminal in cancko supports that. Give it a try (there's a lot more than just syntax'ing in there), but if it doesn't work (or if you don't have a vimrc sample in your share directory), you can just create a ~/.virmc file yourself and enter whatever settings you want. Here's a few that I use to get you started:

Code: [Select]
syntax on
set hlsearch
set autoindent
set ruler
set ignorecase
set smartcase
set backspace=2
set laststatus=2

To find out what each setting does, just enter the command ':help command' (for example, ':help ruler') to get a description of it.

HAPPY VIM'ING!
GROG!

climber

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Vim And .vimrc
« Reply #2 on: January 18, 2006, 03:40:14 am »
Uninstall my vim version and installing the 6.3 version wasn´t no problem. Then I copied the vimrc_example.vim from this folder  /usr/share/vim/vim63/  to /home/zaurus/ and renamed it to .vimrc.

Opening a html-file with vim no syntaxhighlighting was viewable. I´m not sure but needn´t i to do a symbol link to the vim63 folder or something other?

Could someone give me a link to download a working .vimrc  [with syntaxhighlighting on] to exclude this as a error source.


Thanks,
Tom

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
Vim And .vimrc
« Reply #3 on: January 18, 2006, 06:42:57 am »
As someone else just suggested in this thread, try setting your TERM variable before starting vim (export TERM=linux). Does that work? If not, then remove your .vimrc & replace it with the simple example I gave you previously & try it again. Does that work?
GROG!

climber

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Vim And .vimrc
« Reply #4 on: January 25, 2006, 04:03:49 am »
"Export TERM=linux" doesn`t solve the problem. I can't believe that no SL-C3xx user with the new Cacko-ROM has vim without syntaxhighlighting. I´m sure that anyone has managed syntaxhightlighting with his SL-C3xx and Cacko. Please write me a few lines if someone ohter has the same problems and maybe fixed it successfully.

Maybe the newest vim version 6.3 makes problem with syntaxhighlighting?


Thanks,
climber

terryleung83

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Vim And .vimrc
« Reply #5 on: January 25, 2006, 05:01:46 am »
in .profile
Code: [Select]
export TERM=linux
in .vimrc
Code: [Select]
set syntax=on
for syntax highlighting, you need to have the correct file extension like .cpp or .h
also i am using kconsole which is the default console come from cacko
« Last Edit: January 25, 2006, 05:04:30 am by terryleung83 »

climber

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Vim And .vimrc
« Reply #6 on: January 25, 2006, 05:09:32 am »
Sure that´s the requirement that vim hightlights the syntax.  For testing i type "vim test.html" and enter some html code. No syntaxhighlighting...

grog

  • Hero Member
  • *****
  • Posts: 692
    • View Profile
    • http://
Vim And .vimrc
« Reply #7 on: January 25, 2006, 06:49:26 am »
Try this specifically on the command line:

export TERM=linux
vim file.html

and then from within vim:

:set syntax=on

Does this work? If so, there's a problem with your .profile and/or .vimrc files. If not, then ... ?
GROG!

gsgmx

  • Newbie
  • *
  • Posts: 32
    • View Profile
Vim And .vimrc
« Reply #8 on: November 13, 2006, 10:51:56 am »
Quote
I'm curently usinig OZ, not Cacko, but I downloaded the latest vim from the ZUG's Cacko feed (6.3, not sure where you got yours). There's a sample vimrc in the file /usr/share/vim/vim63/vimrc_example.vim, so I'd imagine there should be the same file in the verision directory of your package. Copy this file to ~/.vimrc & you should be good to go (other than what's below).

I noticed that this file (in 6.3) has a special check to turn syntax highlighting on only if you have a color terminal, but I'm not sure if the terminal in cancko supports that. Give it a try (there's a lot more than just syntax'ing in there), but if it doesn't work (or if you don't have a vimrc sample in your share directory), you can just create a ~/.virmc file yourself and enter whatever settings you want. Here's a few that I use to get you started:

Code: [Select]
syntax on
set hlsearch
set autoindent
set ruler
set ignorecase
set smartcase
set backspace=2
set laststatus=2

To find out what each setting does, just enter the command ':help command' (for example, ':help ruler') to get a description of it.

HAPPY VIM'ING!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=111270\"][{POST_SNAPBACK}][/a][/div]

Hi,

i'm looking for vim 7.0 for SharpRom/Cacko 1.23, could not find it anywhere.  Consolemode only would be fine.  
Does anyone know whether it is available?

If not vailable as binary, is it difficult to compile?

George
SL-C1000 with Cacko 1.23
DLlink CF WiFi
Socket CF Ethernet

zogs

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • http://www.autistici.org/c0de
Vim And .vimrc
« Reply #9 on: November 14, 2006, 03:33:40 am »
Quote
"Export TERM=linux" doesn`t solve the problem. I can't believe that no SL-C3xx user with the new Cacko-ROM has vim without syntaxhighlighting. I´m sure that anyone has managed syntaxhightlighting with his SL-C3xx and Cacko. Please write me a few lines if someone ohter has the same problems and maybe fixed it successfully.

Maybe the newest vim version 6.3 makes problem with syntaxhighlighting?

[div align=\"right\"][a href=\"index.php?act=findpost&pid=112280\"][{POST_SNAPBACK}][/a][/div]
for default cacko 1.23 have this  .profile:

Code: [Select]
[...]

export COLORTERM=0
#export TERM=linux

[...]

if [ "'env | grep SSH_TTY'" == " ]; then
       export TERM=vt100
fi

[...]

ok now you can try to change like this:
Code: [Select]
[...]
export COLORTERM=0
#export TERM=linux

[...]
if [ "'env | grep SSH_TTY'" == " ]; then
       export TERM=linux
fi
[...]
or like this:
Code: [Select]
export COLORTERM=0
export TERM=linux

[...]
#if [ "'env | grep SSH_TTY'" == " ]; then
#       export TERM=vt100
#fi
[...]
neo freerunner openmoko user
chi calicunu cheret chircàrme:
c0de - - icq: 256646501 - msn: zogs@hotmail.it - skype: zogsound
..astrolicamus

Optogeek

  • Newbie
  • *
  • Posts: 48
    • View Profile
    • http://optogeek.homelinux.net
Vim And .vimrc
« Reply #10 on: November 16, 2006, 01:59:07 pm »
HI,

Try this.   This works on my c860 on Cacko.  You might need to change the term line to match your set-up.
« Last Edit: November 16, 2006, 02:00:04 pm by Optogeek »
SL-C860 running Cacko 1.23
SL-5500UK with 3.13 Sharp ROM + Cacko Kernel
Origo WLAN and BlueMonkey BT CFs
1GB Crucial SD
1GB Crucial CF