BB: vimrc update.
This commit is contained in:
458
vim/vimrc
458
vim/vimrc
@@ -1,7 +1,23 @@
|
|||||||
"source $VIMRUNTIME/vimrc_example.vim
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
"source $VIMRUNTIME/mswin.vim
|
" Behaviour.
|
||||||
"behave mswin
|
"
|
||||||
|
|
||||||
|
" All our scripts and files are here.
|
||||||
|
if filereadable(expand("~/devel/scripts/vim/vimrc"))
|
||||||
|
set runtimepath+=~/devel/scripts/vim
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Set 'nocompatible' to ward off unexpected things that your distro might
|
||||||
|
" have made, as well as sanely reset options when re-sourcing .vimrc
|
||||||
|
set nocompatible
|
||||||
|
" Line ending is UNIX.
|
||||||
|
set fileformat=unix
|
||||||
|
" Swap files go here.
|
||||||
|
"set directory="~/tmp,." console version complains all the time.
|
||||||
|
" Don't backup files.
|
||||||
|
set nobackup
|
||||||
|
"set backupdir="~/tmp,." git commit doesn't work.
|
||||||
|
" Try to set up UTF-8 encoding.
|
||||||
if has("multi_byte")
|
if has("multi_byte")
|
||||||
if &termencoding == ""
|
if &termencoding == ""
|
||||||
let &termencoding = &encoding
|
let &termencoding = &encoding
|
||||||
@@ -11,47 +27,211 @@ if has("multi_byte")
|
|||||||
"setglobal bomb
|
"setglobal bomb
|
||||||
set fileencodings=ucs-bom,utf-8,latin1
|
set fileencodings=ucs-bom,utf-8,latin1
|
||||||
endif
|
endif
|
||||||
|
" Make tabes to be equal to 4 space chars.
|
||||||
|
set tabstop=4
|
||||||
|
" Number of spaces a <Tab> counts. If different from tabstop a combination of
|
||||||
|
" tabs and spaces will be inserted.
|
||||||
|
set softtabstop=4
|
||||||
|
" For indentation shift by 4 chars.
|
||||||
|
set shiftwidth=4
|
||||||
|
" When on <Tab> insert shiftwidth space in front of line. When off <Tab> inserts
|
||||||
|
" blanks according to softtabstop.
|
||||||
|
set smarttab
|
||||||
|
" Don't expand tabs.
|
||||||
|
set noexpandtab
|
||||||
|
if has('autocmd')
|
||||||
|
" Unset expandtab for make files in any case.
|
||||||
|
autocmd FileType make setlocal noexpandtab
|
||||||
|
" Set expandtab for python files in any case.
|
||||||
|
autocmd FileType python setlocal expandtab
|
||||||
|
endif
|
||||||
|
" Attempt to determine the type of a file based on its name and possibly its
|
||||||
|
" contents. Use this to allow intelligent auto-indenting for each filetype,
|
||||||
|
" and for plugins that are filetype specific.
|
||||||
|
filetype indent plugin on
|
||||||
|
" When opening a new line and no filetype-specific indenting is enabled, keep
|
||||||
|
" the same indent as the line you're currently on. Useful for READMEs, etc.
|
||||||
|
set autoindent
|
||||||
|
" Allow backspacing over autoindent, line breaks and start of insert action
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
" Stop certain movements from always going to the first character of a line.
|
||||||
|
" While this behaviour deviates from that of Vi, it does what most users
|
||||||
|
" coming from other editors would expect.
|
||||||
|
set nostartofline
|
||||||
|
" Try to not cross 80 char boundary.
|
||||||
|
set textwidth=80
|
||||||
|
|
||||||
set nocompatible " Use Vim defaults (much better!)
|
" Existing long lines are not broken.
|
||||||
set backspace=indent,eol,start " allow backspacing over everything in insert mode
|
set formatoptions+=l
|
||||||
"set bs=2 " allow backspacing over everything in insert mode
|
" Auto-wrap comments using textwidth.
|
||||||
"set backup " keep a backup file
|
set formatoptions=cq
|
||||||
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
|
" Insert comment leader if <Enter> is hit in insert mode or 'o' in Normal mode.
|
||||||
" than 50 lines of registers
|
set formatoptions+=ro
|
||||||
set history=50 " keep 50 lines of command line history
|
"set formatoptions-=o " don't autoformat on 'o' e.g. comment wrapping
|
||||||
set ruler " show the cursor position all the time
|
|
||||||
set tabstop=4 " make tabes to be equal to 4 space chars.
|
"
|
||||||
set shiftwidth=4 " for indentation shift by 4 chars.
|
" C++ oriented.
|
||||||
set noexpandtab " don't expand tabs. For MG devel/mg/.vimrc sets expandtab.
|
"
|
||||||
set softtabstop=4 " insert/<BS> deletes 4 space chars.
|
"do not auto insert single line comments
|
||||||
set smarttab " insert/<BS> space in front of line instead of tab.
|
set comments-=://
|
||||||
set fileformat=unix " line ending is unix
|
" Auto-insert multi-line comment continuations
|
||||||
set textwidth=80 " 80 char text
|
set comments+=f://
|
||||||
|
" Do not indent after namespace XX{
|
||||||
|
set cino+=N-s
|
||||||
|
" Match open-bracket indentation when breaking parameter lists over multiple
|
||||||
|
" lines.
|
||||||
|
set cino+=(0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
|
||||||
|
" than 50 lines of registers
|
||||||
let g:netrw_preview = 1 " netrw open window to the right
|
let g:netrw_preview = 1 " netrw open window to the right
|
||||||
let g:netrw_browse_split = 3 " open in a tab
|
let g:netrw_browse_split = 3 " open in a tab
|
||||||
|
|
||||||
" In many terminal emulators the mouse works just fine, thus enable it.
|
|
||||||
if has('mouse')
|
set ttyfast "tf "smooths redraw by using more bandwidth
|
||||||
set mouse=a
|
"set sessionoptions-=options
|
||||||
|
"show shortmessages
|
||||||
|
"set shortmess+=atIW
|
||||||
|
" Set timeout for detecting command key sequence
|
||||||
|
set timeoutlen=400
|
||||||
|
|
||||||
|
"set autoread "update file modified outside of vim
|
||||||
|
|
||||||
|
" Quickly time out on keycodes, but never time out on mappings
|
||||||
|
set notimeout ttimeout ttimeoutlen=200
|
||||||
|
" Use <F11> to toggle between 'paste' and 'nopaste'
|
||||||
|
"set pastetoggle=<F11>
|
||||||
|
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" Display
|
||||||
|
"
|
||||||
|
|
||||||
|
" wrap text at window edge without modifying buffer
|
||||||
|
set nowrap
|
||||||
|
" Scroll this much chars when scrolled horizontally.
|
||||||
|
set sidescroll=1
|
||||||
|
" break at a suitable character (as in breakat)
|
||||||
|
"set linebreak
|
||||||
|
" Begin scrolling this lines from window edge.
|
||||||
|
set scrolloff=0
|
||||||
|
|
||||||
|
" Set the command window height to 2 lines, to avoid many cases of having to
|
||||||
|
" press <Enter> to continue"
|
||||||
|
set cmdheight=2
|
||||||
|
" Always display the status line, even if only one window is displayed
|
||||||
|
set laststatus=2
|
||||||
|
" Display the cursor position on the last line of the screen or in the status
|
||||||
|
" line of a window
|
||||||
|
if exists('&ruler')
|
||||||
|
set ruler
|
||||||
|
endif
|
||||||
|
" Instead of failing a command because of unsaved changes, raise a dialogue
|
||||||
|
" asking if you wish to save changed files.
|
||||||
|
if exists('&confirm')
|
||||||
|
set confirm
|
||||||
|
endif
|
||||||
|
" Use visual bell instead of beeping when doing something wrong
|
||||||
|
if exists('&visualbell')
|
||||||
|
set visualbell
|
||||||
|
" And reset the terminal code for the visual bell. If visualbell is set, and
|
||||||
|
" this line is also included, vim will neither flash nor beep. If visualbell
|
||||||
|
" is unset, this does nothing.
|
||||||
|
set t_vb=
|
||||||
|
endif
|
||||||
|
" Display line numbers on the left
|
||||||
|
if exists('&number')
|
||||||
|
set number
|
||||||
|
endif
|
||||||
|
" Turn on spell check.
|
||||||
|
if exists("+spell")
|
||||||
|
set spell
|
||||||
|
endif
|
||||||
|
" Show 80th column.
|
||||||
|
if exists("+colorcolumn")
|
||||||
|
set colorcolumn=+1 " color textwidth+1-th line
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" a copy-past from my linux vimrc
|
" Show command-line completion above the command line.
|
||||||
if &term=="xterm"
|
set wildmenu
|
||||||
set t_Co=8
|
" wildmenu ignore list
|
||||||
set t_Sb=[4%dm
|
set wildignore=*.o,*.obj,*.bak,*.exe,*.d,*.dd
|
||||||
set t_Sf=[3%dm
|
" Complete to longest common string
|
||||||
endif
|
set wildmode=longest:full
|
||||||
|
" remember more history
|
||||||
|
set history=1000
|
||||||
|
|
||||||
" Switch syntax highlighting on, when the terminal has colors
|
" Switch syntax highlighting on, when the terminal has colors
|
||||||
" Also switch on highlighting the last used search pattern.
|
" Also switch on highlighting the last used search pattern.
|
||||||
if &t_Co > 2 || has("gui_running")
|
if &t_Co > 2 || has("gui_running")
|
||||||
syntax on
|
syntax on
|
||||||
set hlsearch
|
set hlsearch
|
||||||
"
|
|
||||||
" This will turn on svrf highlighting
|
|
||||||
au BufRead,BufNewFile *.svrf set filetype=calibre
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Enable syntax highlighting
|
||||||
|
highlight DiffAdd cterm=none ctermfg=Black ctermbg=Green gui=none guifg=Black guibg=Green
|
||||||
|
highlight DiffDelete cterm=none ctermfg=Black ctermbg=Red gui=none guifg=Black guibg=Red
|
||||||
|
highlight DiffChange cterm=none ctermfg=Black ctermbg=Yellow gui=none guifg=Black guibg=Yellow
|
||||||
|
highlight DiffText cterm=none ctermfg=Black ctermbg=Magenta gui=none guifg=Black guibg=Magenta
|
||||||
|
" Display tabs and trailing spaces visually
|
||||||
|
set list
|
||||||
|
set listchars=tab:>-,trail:·
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"
|
||||||
|
" .gvimrc content here.
|
||||||
|
"
|
||||||
|
if has("gui_running")
|
||||||
|
" set color scheme
|
||||||
|
colorscheme darkblue
|
||||||
|
"set guioptions-=m
|
||||||
|
"set guioptions-=T
|
||||||
|
set lines=50
|
||||||
|
set columns=85
|
||||||
|
|
||||||
|
" Set the font.
|
||||||
|
if has("win32") || has("win64")
|
||||||
|
"set guifont=FreeMono:h14:cANSI
|
||||||
|
"set guifont=Courier\ AM:h12
|
||||||
|
else
|
||||||
|
"set guifont=Bitstream\ Vera\ Sans\ Mono\ 12
|
||||||
|
set guifont=Monospace\ 12
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
colors vahagn_black_terminal
|
||||||
|
endif
|
||||||
|
" Configure coloring on command line terminals.
|
||||||
|
if &term=="xterm"
|
||||||
|
set t_Co=8
|
||||||
|
set t_Sb=[4%dm
|
||||||
|
set t_Sf=[3%dm
|
||||||
|
endif
|
||||||
|
" In many terminal emulators the mouse works just fine, thus enable it.
|
||||||
|
if has('mouse')
|
||||||
|
" set mouse=n
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" One such option is the 'hidden' option, which allows you to re-use the same
|
" One such option is the 'hidden' option, which allows you to re-use the same
|
||||||
" window and switch from an unsaved buffer without saving it first. Also allows
|
" window and switch from an unsaved buffer without saving it first. Also allows
|
||||||
" you to keep an undo history for multiple files when re-using the same window
|
" you to keep an undo history for multiple files when re-using the same window
|
||||||
@@ -61,144 +241,91 @@ endif
|
|||||||
" try to quit without saving, and swap files will keep you safe if your computer
|
" try to quit without saving, and swap files will keep you safe if your computer
|
||||||
" crashes.
|
" crashes.
|
||||||
if exists('&hidden')
|
if exists('&hidden')
|
||||||
set hidden
|
set hidden
|
||||||
endif
|
|
||||||
|
|
||||||
" Instead of failing a command because of unsaved changes, raise a dialogue
|
|
||||||
" asking if you wish to save changed files.
|
|
||||||
if exists('&confirm')
|
|
||||||
set confirm
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Use visual bell instead of beeping when doing something wrong
|
|
||||||
if exists('&visualbell')
|
|
||||||
set visualbell
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Display line numbers on the left
|
|
||||||
if exists('&number')
|
|
||||||
set number
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Turn on spell check.
|
|
||||||
if exists("+spell")
|
|
||||||
set spell
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Show 80th column.
|
|
||||||
if exists("+colorcolumn")
|
|
||||||
set colorcolumn=+1 " color textwidth+1-th line
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Modelined are used to configure files.
|
" Modelined are used to configure files.
|
||||||
if exists('&modeline')
|
if exists('&modeline')
|
||||||
set modeline
|
set modeline
|
||||||
set modelines=10
|
set modelines=10
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Set fold method if supported
|
" Set fold method if supported
|
||||||
if has('folding')
|
if has('folding')
|
||||||
set nofoldenable
|
set nofoldenable
|
||||||
set foldmethod=indent "fold based on indent
|
set foldmethod=indent "fold based on indent
|
||||||
set foldnestmax=5
|
set foldnestmax=3
|
||||||
set foldlevel=1
|
set foldminlines=4
|
||||||
if has("autocmd")
|
set foldlevel=1
|
||||||
autocmd FileType vim setlocal foldmethod=marker
|
set foldcolumn=2 " foldcolumn is width 2
|
||||||
autocmd FileType c setlocal foldmethod=syntax
|
if has("autocmd")
|
||||||
autocmd FileType h setlocal foldmethod=syntax
|
autocmd FileType vim setlocal foldmethod=marker
|
||||||
autocmd FileType cpp setlocal foldmethod=syntax
|
autocmd FileType c setlocal foldmethod=syntax
|
||||||
endif
|
autocmd FileType h setlocal foldmethod=syntax
|
||||||
endif
|
autocmd FileType cpp setlocal foldmethod=syntax
|
||||||
|
endif
|
||||||
" Unset expandtab for make files in any case.
|
|
||||||
if has('autocmd')
|
|
||||||
autocmd FileType make setlocal noexpandtab
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Set expandtab for python files in any case.
|
|
||||||
if has('autocmd')
|
|
||||||
autocmd FileType python setlocal expandtab
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Only do this part when compiled with support for autocommands.
|
" Only do this part when compiled with support for autocommands.
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
|
|
||||||
" Enable file type detection.
|
" Enable file type detection.
|
||||||
" Use the default filetype settings, so that mail gets 'tw' set to 72,
|
" Use the default filetype settings, so that mail gets 'tw' set to 72,
|
||||||
" 'cindent' is on in C files, etc.
|
" 'cindent' is on in C files, etc.
|
||||||
" Also load indent files, to automatically do language-dependent indenting.
|
" Also load indent files, to automatically do language-dependent indenting.
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
" Put these in an autocmd group, so that we can delete them easily.
|
" start with all folds open
|
||||||
augroup vimrcEx
|
au BufRead,BufNewFile,BufWinEnter * normal zR
|
||||||
au!
|
" highlight lone colon characters
|
||||||
|
highlight WarnChar ctermbg=yellow ctermfg=red guibg=#FFCC33 guifg=#FF0000
|
||||||
|
"apply highlight when opening a file, changing text (N or I), or opening a split
|
||||||
|
au BufRead,InsertCharPre *.cpp 2mat WarnChar /\w\+;\?:;\?\w\+/
|
||||||
|
|
||||||
" For all text files set 'textwidth' to 78 characters.
|
" Put these in an autocmd group, so that we can delete them easily.
|
||||||
autocmd FileType text setlocal textwidth=79
|
augroup vimrcEx
|
||||||
|
au!
|
||||||
|
|
||||||
" 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).
|
|
||||||
" Also don't do it when the mark is in the first line, that is the default
|
|
||||||
" position when opening a file.
|
|
||||||
autocmd BufReadPost *
|
|
||||||
\ if line("'\"") > 1 && line("'\"") <= line("$") |
|
|
||||||
\ exe "normal! g`\"" |
|
|
||||||
\ endif
|
|
||||||
|
|
||||||
augroup END
|
" 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).
|
||||||
|
" Also don't do it when the mark is in the first line, that is the default
|
||||||
|
" position when opening a file.
|
||||||
|
autocmd BufReadPost *
|
||||||
|
\ if line("'\"") > 1 && line("'\"") <= line("$") |
|
||||||
|
\ exe "normal! g`\"" |
|
||||||
|
\ endif
|
||||||
|
|
||||||
|
augroup END
|
||||||
|
|
||||||
else
|
|
||||||
set autoindent " always set autoindenting on
|
|
||||||
endif " has("autocmd")
|
endif " has("autocmd")
|
||||||
|
|
||||||
" Convenient command to see the difference between the current buffer and the
|
" Convenient command to see the difference between the current buffer and the
|
||||||
" file it was loaded from, thus the changes you made.
|
" file it was loaded from, thus the changes you made.
|
||||||
" Only define it when not defined already.
|
" Only define it when not defined already.
|
||||||
if !exists(":DiffOrig")
|
if !exists(":DiffOrig")
|
||||||
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
|
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
|
||||||
\ | wincmd p | diffthis
|
\ | wincmd p | diffthis
|
||||||
endif
|
endif
|
||||||
|
|
||||||
set diffexpr=MyDiff()
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
function MyDiff()
|
" Key Mappings
|
||||||
let opt = '-a --binary '
|
|
||||||
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
|
|
||||||
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
|
|
||||||
let arg1 = v:fname_in
|
|
||||||
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
|
|
||||||
let arg2 = v:fname_new
|
|
||||||
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
|
|
||||||
let arg3 = v:fname_out
|
|
||||||
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
|
|
||||||
let eq = ''
|
|
||||||
if $VIMRUNTIME =~ ' '
|
|
||||||
if &sh =~ '\<cmd'
|
|
||||||
let cmd = '""' . $VIMRUNTIME . '\diff"'
|
|
||||||
let eq = '"'
|
|
||||||
else
|
|
||||||
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
let cmd = $VIMRUNTIME . '\diff'
|
|
||||||
endif
|
|
||||||
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Don't let vim be too smart.
|
|
||||||
set formatoptions=cql
|
|
||||||
"
|
"
|
||||||
" P4
|
|
||||||
command! -nargs=* PFedit :!p4 edit <args> %
|
" F4 grep the word under cursor.
|
||||||
command! -nargs=* PFrevert :!p4 revert <args> %
|
map <F4> :execute "grep " . expand("<cword>") . " -r *.h *.cpp *.c *.f" <Bar> cw<CR>
|
||||||
command! -nargs=* PFdiff :!p4 diff <args> %
|
" Create a new tab.
|
||||||
|
map <silent> <C-F3> :tabnew<CR>
|
||||||
|
"
|
||||||
|
"command! -nargs=* PFdiff :!p4 diff <args> %
|
||||||
"
|
"
|
||||||
" Loads CF5Compile
|
" Loads CF5Compile
|
||||||
" Compile and run file if Ctrl-F5 is pressed.
|
" Compile and run file if Ctrl-F5 is pressed.
|
||||||
"
|
"
|
||||||
if !exists('*CF5Compile')
|
if !exists('*CF5Compile')
|
||||||
runtime plugin/cf5-compiler.vim
|
runtime plugin/cf5-compiler.vim
|
||||||
endif
|
endif
|
||||||
map <silent> <C-F5> :call CF5Compile(1)<CR>
|
map <silent> <C-F5> :call CF5Compile(1)<CR>
|
||||||
map <silent> <F5> :call CF5Compile(0)<CR>
|
map <silent> <F5> :call CF5Compile(0)<CR>
|
||||||
"
|
"
|
||||||
@@ -214,7 +341,7 @@ noremap <Down> gj
|
|||||||
imap <Up> <C-O>gk
|
imap <Up> <C-O>gk
|
||||||
imap <Down> <C-O>gj
|
imap <Down> <C-O>gj
|
||||||
"
|
"
|
||||||
" Working with tabs especially if using Putty.
|
" Working with tabs especially if using console version.
|
||||||
"
|
"
|
||||||
nnoremap th :tabfirst<CR>
|
nnoremap th :tabfirst<CR>
|
||||||
nnoremap tj :tabnext<CR>
|
nnoremap tj :tabnext<CR>
|
||||||
@@ -223,41 +350,38 @@ nnoremap tl :tablast<CR>
|
|||||||
nnoremap tm :tabm<Space>
|
nnoremap tm :tabm<Space>
|
||||||
nnoremap td :tabclose<CR>
|
nnoremap td :tabclose<CR>
|
||||||
"
|
"
|
||||||
" .gvimrc content here.
|
" .gvimrc content here.
|
||||||
"
|
"
|
||||||
if has("gui_running")
|
if has("gui_running")
|
||||||
|
":tab drop {file}
|
||||||
colors darkblue " set color scheme
|
|
||||||
set lines=50
|
|
||||||
set columns=85
|
|
||||||
if has("win32") || has("win64")
|
|
||||||
set guifont=FreeMono:h14:cANSI
|
|
||||||
"set guifont=Courier\ AM:h12
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
" Hide show menu and toolbar.
|
||||||
|
map <silent> <C-F2> :if &guioptions =~# 'm' <Bar>
|
||||||
|
\set guioptions-=m <Bar>
|
||||||
|
\set guioptions-=T <Bar>
|
||||||
|
\set showtabline=0 <Bar>
|
||||||
|
\else <Bar>
|
||||||
|
\set guioptions+=m <Bar>
|
||||||
|
\set guioptions+=T <Bar>
|
||||||
|
\set showtabline=1 <Bar>
|
||||||
|
\endif <CR>
|
||||||
|
|
||||||
":tab drop {file}
|
" Open file in a new tab.
|
||||||
|
|
||||||
" Hide show menu and toolbar.
|
|
||||||
map <silent> <C-F2> :if &guioptions =~# 'm' <Bar>
|
|
||||||
\set guioptions-=m <Bar>
|
|
||||||
\set guioptions-=T <Bar>
|
|
||||||
\set showtabline=0 <Bar>
|
|
||||||
\else <Bar>
|
|
||||||
\set guioptions+=m <Bar>
|
|
||||||
\set guioptions+=T <Bar>
|
|
||||||
\set showtabline=1 <Bar>
|
|
||||||
\endif <CR>
|
|
||||||
|
|
||||||
" Open file in a new tab.
|
|
||||||
if has("browsefilter")
|
if has("browsefilter")
|
||||||
let g:browsefilter = "All Files (*.*)\t*\n"
|
let g:browsefilter = "All Files (*.*)\t*\n"
|
||||||
endif
|
endif
|
||||||
"if has("browse")
|
|
||||||
map <silent> <C-F3> :browse tabnew %:p:h<CR>
|
|
||||||
"endif
|
|
||||||
|
|
||||||
else
|
else
|
||||||
colors vahagn_black_terminal
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
"
|
||||||
|
" Vundle experimental stuff here.
|
||||||
|
"
|
||||||
|
if filereadable(expand("~/.vim/bundle/Vundle.vim/README.md"))
|
||||||
|
filetype off
|
||||||
|
set rtp+=~/.vim/bundle/Vundle.vim
|
||||||
|
call vundle#begin()
|
||||||
|
Plugin 'VundleVim/Vundle.vim'
|
||||||
|
call vundle#end()
|
||||||
|
filetype plugin indent on
|
||||||
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user