Doing ssh from Putty
Not Getting colored syntax exported TERM = linux (or xterm-color ) ?
Editor : Vim
No color syntax for any lang (c,c++,java etc)
in vim when i do : set nu, it will showing line numbers in yellow
color. (i.e. after exporting TERM)
Any Idea, to enable syntax color for c/c++
Also while editing with putty, (on any shell) i am not able to use my
NumPad, when i press any key on numpad it will doing some random work
|
|
0
|
|
|
|
Reply
|
raxitsheth2000 (156)
|
8/24/2006 1:03:30 PM |
|
raxitsheth2000@yahoo.co.in wrote:
> Doing ssh from Putty
> Not Getting colored syntax exported TERM = linux (or xterm-color ) ?
> Editor : Vim
> No color syntax for any lang (c,c++,java etc)
>
> in vim when i do : set nu, it will showing line numbers in yellow
> color. (i.e. after exporting TERM)
>
> Any Idea, to enable syntax color for c/c++
>
> Also while editing with putty, (on any shell) i am not able to use my
> NumPad, when i press any key on numpad it will doing some random work
Perhaps not a direct answer, but if it helps, I have a working
Putty(0.58)/VIM(6.4) setup with TERM=xterm, and a default vimrc file in
/etc/vimrc. Making no assumptions about your experience, I can also say
make sure that when setting/exporting an environment variable in *nix
that you do not have any spaces between the var name and value, i.e.
TERM=xterm and not TERM = xterm. Also, my keypad seems to work fine...
Are you sure the num lock is really on? Does it work ok on your local
machine? Below I posted my /etc/vimrc
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=utf-8,latin1
endif
set nocompatible " Use Vim defaults (much better!)
set bs=2 " allow backspacing over everything in insert
mode
"set ai " always set autoindenting on
"set backup " keep a backup file
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
" Only do this part when compiled with support for autocommands
if has("autocmd")
" In text files, always limit the width of text to 78 characters
autocmd BufRead *.txt set tw=78
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal! g'\"" |
\ endif
endif
if has("cscope") && filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
if &term=="xterm"
set t_Co=8
set t_Sb=m
set t_Sf=m
endif
|
|
0
|
|
|
|
Reply
|
David
|
8/24/2006 2:32:13 PM
|
|
What I've done when vim doesn't recognize my terminal is do the
following in my .vimrc
term=builtin_ansi
t_Co=16
syntax on
Phibz
raxitsheth2000@yahoo.co.in wrote:
> Doing ssh from Putty
> Not Getting colored syntax exported TERM = linux (or xterm-color ) ?
> Editor : Vim
> No color syntax for any lang (c,c++,java etc)
>
> in vim when i do : set nu, it will showing line numbers in yellow
> color. (i.e. after exporting TERM)
>
> Any Idea, to enable syntax color for c/c++
>
> Also while editing with putty, (on any shell) i am not able to use my
> NumPad, when i press any key on numpad it will doing some random work
|
|
0
|
|
|
|
Reply
|
phibz
|
8/24/2006 6:52:06 PM
|
|
Thanks, David,
Is there any way by which i can write new vimrc file,(provided by you)
in my area(in which i m having permission to write) and Tell Vim to
load the new vimrc file.
Raxit
|
|
0
|
|
|
|
Reply
|
raxitsheth2000 (156)
|
9/1/2006 12:44:03 PM
|
|
David,
I have just copy/paste ur file, put it into MY_HOME_DIR/vimrc;
started bash
vi -u MY_HOME_DIR/vimrc hello.c
its openup hello.c file as per previous, still no c/c++-syntax coloring
any idea on how to cop is really appreciated
Thanks
Raxit
|
|
0
|
|
|
|
Reply
|
raxitsheth2000 (156)
|
9/1/2006 12:51:04 PM
|
|
|
4 Replies
416 Views
(page loaded in 0.096 seconds)
Similiar Articles: JTextPane - syntax highlighting - comp.lang.java.guiGUI colors Linux - comp.soft-sys.matlab JTextPane - syntax highlighting - comp.lang.java.gui Not Getting colored syntax TERM type = linux, xterm-color ? - comp ... GUI colors Linux - comp.soft-sys.matlabJTextPane - syntax highlighting - comp.lang.java.gui JTextPane - syntax highlighting - comp.lang.java.gui Not Getting colored syntax TERM type = linux, xterm-color ? - comp ... new-line Character in PDF-Syntax - comp.text.pdfNot Getting colored syntax TERM type = linux, xterm-color ? - comp ... Editor : Vim No color syntax for any lang (c,c++,java etc) ... ... text files, always limit the ... PuTTY, X, and backspace - comp.unix.solarisNot Getting colored syntax TERM type = linux, xterm-color ? - comp ... Doing ssh from Putty Not Getting colored syntax exported TERM = linux (or xterm ... Color mapping Parts/Assemblies to eDrawings - comp.cad.solidworks ...Copy Paste Surface from one part to a new part - comp.cad ..... Getting colored syntax TERM type = linux, xterm-color ... map usa rad ... of usa niagra falls usa map ... [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... xterm-color - The UNIX and Linux Forumslinux usually works w/o a ... that if I set TERM=xterm-color in my environment, then emacs will will send colored syntax ... emacs: Terminal type xterm-color is not ... Getting colors to work on solaris - Vim Tips Wikisyntax on In this case you will get colorised syntax in vim, called from a dtterm On a native xterm you will not get color ... TERM=xterm-color ... xterm-color f from linux ... 7/20/2012 5:55:20 AM
|