]> git.phdru.name Git - dotfiles.git/blobdiff - .vimrc
.vimrc: Set mouse only if mouse support is available
[dotfiles.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index bc18a76ea2aa263163d917f70f8b5ff875321969..bcc859b9871c29e94f3125c3805d7a24ca65c5a6 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -87,7 +87,9 @@ set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:p:h\")})%)%(\ %a%)\ -\ [%{$USER}@%{h
 
 " 9 using the mouse
 
-set mouse=ar      " Use mouse in all modes, plus hit-return
+if has('mouse')
+   set mouse=ar      " Use mouse in all modes, plus hit-return
+endif
 
 " 12 messages and info
 
@@ -570,6 +572,9 @@ function! SlowTerm()
    set nowildmenu
    set wildmode=list:longest
    set viminfo=!,h,'10,<100,s5
+   if has("iconv")
+      set viminfo^=c
+   endif
    syntax off
    highlight NonText cterm=NONE ctermfg=NONE
 endfunction
@@ -589,7 +594,7 @@ endif
 
 
 " From Tip 212:
-" http://vim.wikia.com/wiki/Setting_file_attributes_without_reloading_a_buffer
+" http://vim.fandom.com/wiki/Setting_file_attributes_without_reloading_a_buffer
 
 if executable('chmod')
    function! SetExecutableBit(x)
@@ -656,7 +661,7 @@ endif
 
 " Called automagically after every buffer read, enables fileencoding
 " setting from modeline (see Tip #911:
-" http://vim.wikia.com/wiki/How_to_make_fileencoding_work_in_the_modeline)
+" http://vim.fandom.com/wiki/How_to_make_fileencoding_work_in_the_modeline)
 function! AutoEncoding()
   if &modified && &fileencoding != ""
     call SetupEncoding(&fileencoding)