5

enter image description here

I don't know why my gvim windows looks like this in linux. Is there anything I need to add to my vimrc file in addition to this?

execute pathogen#infect()
syntax on
filetype plugin indent on
set nocompatible
set number
set numberwidth=1
set autoindent
set backspace=2
set backspace=indent,eol,start
set tabstop=4
set shiftwidth=4
set shellslash
set grepprg=grep\ -nH\ $*
filetype indent on
let g:tex_flavor='latex'
imap ^[OA <ESC>ki
imap ^[OB <ESC>ji
imap ^[OC <ESC>li
imap ^[OD <ESC>hi
augroup markdown
    au!
    au BufNewFile,BufRead *.md,*.markdown setlocal filetype=ghmarkdown
augroup END
colorscheme koehler 
set guifont=Consolas\ 12
set guioptions-=T "remove toolbar
if !has("gui_running")
    set guioptions=icpM
    set term=xterm
    set t_Co=256
    let &t_AB="\e[48;5;%dm"
    let &t_AF="\e[38;5;%dm"
    inoremap <Char-0x07F> <BS>
    nnoremap <Char-0x07F> <BS>
    colorscheme koehler 
endif

enter image description here

DIFFERENCE - left one is terminal and right side is gvim I didn't have this problem in windows 10

8

The problem is probably that you don't have the Consolas font installed and that Vim defaults to an ugly default font.

Try using a different font, for example this should work on most Linux systems:

set guifont=Dejavu\ Sans\ Mono\ 12

If you want it to work on both Windows and Linux you can use something like:

if has('gui_gtk')
    set guifont=Dejavu\ Sans\ Mono\ 12
else
    set guifont=Consolas:h12
endif

Or, if you want to use Consolas on Linux, you can install it.

  • worked pretty well. Thank you for the reply (very useful) – neelabalan Sep 21 '16 at 10:57
  • 1
    As an alternative to the Consolas font one can use Inconsolata which is pretty similar. It's free (as in free beer) and available on most Linux distrutions repositories – toro2k Sep 21 '16 at 10:57
  • 1
    By the way, you can accept answers by pressing the tick next to the voting arrows, which makes it easier to find for other people with your question. – figgycity50 Sep 21 '16 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.