LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-31-2006, 12:08 PM   #1
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Rep: Reputation: 30
Question how to set bold-font in vim?


hello... I'm shure it's easy to set it .. but cannot find out how.
it's Vim versión 6.3.7 **not the gui one(gvim)!
I've searched and the only thing I found was strings like:
set guifont=the*font*name:b // 'b' stands from 'bold'
..and the like.. but no one works puttin'em in the .vimrc nor in the vim's command line during run-time (using ':' at the begining of the string, as every command in vim).
What I want is to set bold font to the entire editor just to see better when writting code .. if the 'bold' feature can be set *only* in .c files (as the syntax recognition and highlight) that would be great..
can anybody help me with this issue?
thanks in advance.
 
Old 02-01-2006, 05:06 AM   #2
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
I'm not sure about this but try:
Code:
" 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

" Only do this part when compiled with support for autocommands.
if has("autocmd")

  " Enable file type detection.
  " Use the default filetype settings, so that mail gets 'tw' set to 72,
  " 'cindent' is on in C files, etc.
  " Also load indent files, to automatically do language-dependent indenting.
  filetype plugin indent on
These are some of the setings from the example file /usr/local/share/vim/vim63/gvimrc_example.vim which I began using some time ago, and I do have bold font and syntax hilighting for most things and wonder in bold is set auto by the hilightin
 
Old 02-01-2006, 10:31 AM   #3
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
hi, dive
I've got the same code as you in my .vimrc file, but no bold font at all
..but you say you already have bold font ... let's analize that code lines:
Code:
if &t_Co > 2 || has("gui_running")
  syntax on
guess that's turning on the syntax-highlight .. no problem: I've got that..
the next:
Code:
 set hlsearch
endif
it seems that's turning on the highlight search -in fact, in my case the one highlighted isn't the target string, but the background behind it (an ugly-yellow bkg color, puajj!)
in any case, I've got that, too...

..so, I cannot see where is the "set-bold-font:TRUE" string in that code.. (that string was just an example..don't now the real syntax)
maybe you've got such "instruction" elsewhere in your code?
tx 4 helping.
 
Old 02-01-2006, 10:44 AM   #4
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Well heres the whole .vimrc:

Code:
" An example for a vimrc file.
"
" Maintainer:	Bram Moolenaar <Bram@vim.org>
" Last change:	2002 Sep 19
"
" To use it, copy it to
"     for Unix and OS/2:  ~/.vimrc
"	      for Amiga:  s:.vimrc
"  for MS-DOS and Win32:  $VIM\_vimrc
"	    for OpenVMS:  sys$login:.vimrc

" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
  finish
endif

" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible

" allow backspacing over everything in insert mode
set backspace=indent,eol,start

if has("vms")
  set nobackup		" do not keep a backup file, use versions instead
else
  set nobackup		" keep a backup file
endif
set history=50		" keep 50 lines of command line history
set ruler		" show the cursor position all the time
set showcmd		" display incomplete commands
set incsearch		" do incremental searching

" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")

" Don't use Ex mode, use Q for formatting
map Q gq

" This is an alternative that also works in block mode, but the deleted
" text is lost and it only works for putting the current register.
"vnoremap p "_dp

" 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

" Only do this part when compiled with support for autocommands.
if has("autocmd")

  " Enable file type detection.
  " Use the default filetype settings, so that mail gets 'tw' set to 72,
  " 'cindent' is on in C files, etc.
  " Also load indent files, to automatically do language-dependent indenting.
  filetype plugin indent on

  " Put these in an autocmd group, so that we can delete them easily.
  augroup vimrcEx
  au!

  " For all text files set 'textwidth' to 78 characters.
  autocmd FileType text setlocal textwidth=78

  " When editing a file, always jump to the last known cursor position.
  " Don't do it when the position is invalid or when inside an event handler
  " (happens when dropping a file on gvim).
  autocmd BufReadPost *
    \ if line("'\"") > 0 && line("'\"") <= line("$") |
    \   exe "normal g`\"" |
    \ endif

  augroup END

else

  set autoindent		" always set autoindenting on

endif " has("autocmd")
This is pretty much the exact example file except I turned backups off temporarily

Last edited by dive; 02-01-2006 at 10:46 AM.
 
Old 02-01-2006, 02:20 PM   #5
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
mmm ... I copy your .vimrc and set it to become mine, but still no bold-font ...
just finished googlin' about the issue, with no luck.. don't know where else to search. (at least it is not *so* important)
thanks anyway, pal
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set TAB to 4 spaces in vim? kornerr Linux - General 2 01-05-2006 01:26 AM
Can not display bold font in Mozilla firefox can not be displayed! septanla Ubuntu 1 04-24-2005 11:01 AM
how do bold and italic in vim? lugoteehalt Linux - Newbie 3 04-19-2004 07:17 AM
vim 6.2 & set nocp JJX Linux - Newbie 6 04-08-2004 06:34 AM
bold Font in Bash Or C AMMullan Programming 5 09-24-2003 04:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration