Thursday, October 30, 2014

.vimrc not always used

Hello!


I'm using the current version of MacVim (Sanpshot 73) on an iMac running
OS X 10.10 Yosemite.

I have in my home-directory the .vimrc-file attached below.
However the .vimrc is working only when opening first MacVim and then a
file in a tab. Opening a file via the context-menu or from MacVim via
the menu File > Open opens the file in a standard MacVim-window (see the
two attached screenshots).

Do you have an idea?

Thanks!


Regards,
Vlad

P.S. Here comes my .vimrc:

---
set guifont=Source\ Code\ Pro:h24

" window-size
set lines=43
set columns=80

" linebreak
set textwidth=72
set linebreak

" incremental search
set incsearch

" highlight search
set hlsearch

" stop highlight search by pressing <CR>
:nnoremap <CR> :noh<CR>/<BS>

" ignore case by search
set ignorecase

" linenumber
set number

" tabs
set shiftwidth=2
set tabstop=2
set expandtab

" clipboard
set clipboard=unnamed

" format options
set formatoptions+=r
set com-=fb:-

" colorscheme
" colorscheme oceandeep

" solarized?
set background=dark
colorscheme solarized

" syntax
syntax enable
"set syntax=vim
syntax on
"syntax off

" maping --------------------------------------------------------------

" für neue Zeile, ohne insert-mode (so wie beim o bzw. O)
map <S-Enter> O<Esc>
map <CR> o<Esc>

" CTRL-CR splitet die Zeile
:nmap <c-cr> i<cr><Esc>

"
" Makro's & Functions -------------------------------------------------
"

" Search in a specific column and count the hits ---------------------
fu! ColMatchCount(col,patt)
let n=0
:exe 'g/\%'.a:col.'c'.a:patt."/let n=n+1"
echo " String <".a:patt."> occurs ".n." times in the column >".a:col."<."
endfunction

:com! -nargs=* FCAll call ColMatchCount(<f-args>)
" REMEMBER!
" 1.- ;; or \
" 2.- space
" 3.- # (column, where to search)
" 4.- space
" 5.- string (what to search)
map ;; :FCAll
map \ :FCAll

" Search and count the hits ------------------------------------------
fu! MatchCount(patt)
let n=0
:exe 'g/'.a:patt."/let n=n+1"
echo " String <".a:patt."> occurs ".n." times."
endfunction

:com! -nargs=* FAll call MatchCount(<f-args>)

map ;;; :FAll
" REMEMBER!
" 1.- ;;;
" 2.- space
" 3.- string (what to search)

"
" ab hier test *** --- *** --- *** --- *** --- *** --- *** --- *** --- *** --- *** --- *** ---
"


if has("multi_byte")
if &termencoding == ""
let &termencoding = &encoding
endif
set encoding=utf-8
setglobal fileencoding=utf-8 bomb
set fileencodings=ucs-bom,utf-8,latin1
endif


"set showcmd
"
"if has("gui_running")
" if has("gui_gtk2")
" echomsg "GTK+2 GUI detected"
" set guifont=Courier\ New\ 14
" elseif has("gui_kde")
" echomsg "kvim gui detected"
" set guifont=Courier\ New/14
" elseif has("x11")
" echomsg "other X11 GUI detected"
" set guifont=-*-courier-medium-r-normal-*-*-200-*-*-m-*-*
" else
" echomsg "non-X11 GUI detected"
" set guifont=Courier_New:h14:cDEFAULT
" endif
" echomsg "guifont set to" &guifont
"endif

---

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: