mirror of
https://github.com/vim-scripts/perl-support.vim.git
synced 2026-10-11 00:48:59 +02:00
- New global variable g:Perl_InsertFileHeader (suppress file description comment for new files). - Two new ex commands: PerlScriptArguments, PerlSwitches - Specifying command line arguments and Perl command line switches improved. - Bugfix: g:Perl_LoadMenus now works. - Bugfix: g:Perl_MapLeader now works. - Bugfix: syntax check under 64-Bit MS-Windows now works. - Some settings moved to the filetype plugin. - Removed superfluous settings from the filetype plugin. - Integration of Make moved into the toolbox. - Minor improvements.
177 lines
8.2 KiB
Plaintext
177 lines
8.2 KiB
Plaintext
"===================================================================================
|
|
" FILE: .vimrc
|
|
" DESCRIPTION: suggestion for a personal configuration file ~/.vimrc
|
|
" AUTHOR: Dr.-Ing. Fritz Mehner
|
|
" VERSION: 1.0
|
|
" CREATED: 23.05.2008
|
|
"===================================================================================
|
|
"
|
|
"===================================================================================
|
|
" GENERAL SETTINGS
|
|
"===================================================================================
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" Use Vim settings, rather then Vi settings.
|
|
" This must be first, because it changes other options as a side effect.
|
|
"-------------------------------------------------------------------------------
|
|
set nocompatible
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" Enable file type detection. Use the default filetype settings.
|
|
" Also load indent files, to automatically do language-dependent indenting.
|
|
"-------------------------------------------------------------------------------
|
|
filetype plugin on
|
|
filetype indent on
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" Switch syntax highlighting on.
|
|
"-------------------------------------------------------------------------------
|
|
syntax on
|
|
"
|
|
" Platform specific items:
|
|
" - central backup directory (has to be created)
|
|
" - default dictionary
|
|
" Uncomment your choice.
|
|
if has("win16") || has("win32") || has("win64") || has("win95")
|
|
"
|
|
" runtime mswin.vim
|
|
" set backupdir =$VIM\vimfiles\backupdir
|
|
" set dictionary=$VIM\vimfiles\wordlists/german.list
|
|
else
|
|
set backupdir =$HOME/.vim.backupdir
|
|
set dictionary=$HOME/.vim/wordlists/german.list,$HOME/.vim/wordlists/english.list
|
|
endif
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" Various settings
|
|
"-------------------------------------------------------------------------------
|
|
set autoindent " copy indent from current line
|
|
set autoread " read open files again when changed outside Vim
|
|
set autowrite " write a modified buffer on each :next , ...
|
|
set backspace=indent,eol,start " backspacing over everything in insert mode
|
|
set backup " keep a backup file
|
|
set browsedir=current " which directory to use for the file browser
|
|
set complete+=k " scan the files given with the 'dictionary' option
|
|
set history=50 " keep 50 lines of command line history
|
|
set hlsearch " highlightthe last used search pattern
|
|
set incsearch " do incremental searching
|
|
set listchars=tab:>.,eol:\$ " strings to use in 'list' mode
|
|
set mouse=a " enable the use of the mouse
|
|
set nowrap " do not wrap lines
|
|
set popt=left:8pc,right:3pc " print options
|
|
set ruler " show the cursor position all the time
|
|
set shiftwidth=2 " number of spaces to use for each step of indent
|
|
set showcmd " display incomplete commands
|
|
set smartindent " smart autoindenting when starting a new line
|
|
set tabstop=2 " number of spaces that a <Tab> counts for
|
|
set visualbell " visual bell instead of beeping
|
|
set wildignore=*.bak,*.o,*.e,*~ " wildmenu: ignore these extensions
|
|
set wildmenu " command-line completion in an enhanced mode
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" highlight paired brackets
|
|
"-------------------------------------------------------------------------------
|
|
highlight MatchParen ctermbg=blue guibg=lightyellow
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" some additional hot keys
|
|
"-------------------------------------------------------------------------------
|
|
" F2 - write file without confirmation
|
|
" F3 - call file explorer Ex
|
|
" F4 - show tag under curser in the preview window (tagfile must exist!)
|
|
" F6 - list all errors
|
|
" F7 - display previous error
|
|
" F8 - display next error
|
|
" F12 - list buffers and edit n-th buffer
|
|
"-------------------------------------------------------------------------------
|
|
noremap <silent> <F2> :write<CR>
|
|
noremap <silent> <F3> :Explore<CR>
|
|
noremap <silent> <F4> :execute ":ptag ".expand("<cword>")<CR>
|
|
noremap <silent> <F5> :copen<CR>
|
|
noremap <silent> <F6> :cclose<CR>
|
|
noremap <silent> <F7> :cprevious<CR>
|
|
noremap <silent> <F8> :cnext<CR>
|
|
noremap <F12> :ls<CR>:edit #
|
|
"
|
|
inoremap <silent> <F2> <C-C>:write<CR>
|
|
inoremap <silent> <F3> <C-C>:Explore<CR>
|
|
inoremap <silent> <F4> <C-C>:execute ":ptag ".expand("<cword>")<CR>
|
|
inoremap <silent> <F5> <C-C>:copen<CR>
|
|
inoremap <silent> <F6> <C-C>:cclose<CR>
|
|
inoremap <silent> <F7> <C-C>:cprevious<CR>
|
|
inoremap <silent> <F8> <C-C>:cnext<CR>
|
|
inoremap <F12> <C-C>:ls<CR>:edit #
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" comma always followed by a space
|
|
"-------------------------------------------------------------------------------
|
|
inoremap , ,<Space>
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" autocomplete parenthesis, (brackets) and braces
|
|
"-------------------------------------------------------------------------------
|
|
inoremap ( ()<Left>
|
|
inoremap [ []<Left>
|
|
inoremap { {}<Left>
|
|
"
|
|
vnoremap ( s()<Esc>P<Right>%
|
|
vnoremap [ s[]<Esc>P<Right>%
|
|
vnoremap { s{}<Esc>P<Right>%
|
|
"
|
|
" surround content with additional spaces
|
|
"
|
|
vnoremap ) s( )<Esc><Left>P<Right><Right>%
|
|
vnoremap ] s[ ]<Esc><Left>P<Right><Right>%
|
|
vnoremap } s{ }<Esc><Left>P<Right><Right>%
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" autocomplete quotes (visual and select mode)
|
|
"-------------------------------------------------------------------------------
|
|
xnoremap ' s''<Esc>P<Right>
|
|
xnoremap " s""<Esc>P<Right>
|
|
xnoremap ` s``<Esc>P<Right>
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" The current directory is the directory of the file in the current window.
|
|
"-------------------------------------------------------------------------------
|
|
if has("autocmd")
|
|
autocmd BufEnter * :lchdir %:p:h
|
|
endif
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" Fast switching between buffers
|
|
" The current buffer will be saved before switching to the next one.
|
|
" Choose :bprevious or :bnext
|
|
"-------------------------------------------------------------------------------
|
|
noremap <silent> <s-tab> :if &modifiable && !&readonly &&
|
|
\ &modified <CR> :write<CR> :endif<CR>:bprevious<CR>
|
|
inoremap <silent> <s-tab> <C-C>:if &modifiable && !&readonly &&
|
|
\ &modified <CR> :write<CR> :endif<CR>:bprevious<CR>
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" Leave the editor with Ctrl-q (KDE): Write all changed buffers and exit Vim
|
|
"-------------------------------------------------------------------------------
|
|
nnoremap <C-q> :wqall<CR>
|
|
"
|
|
"
|
|
"===================================================================================
|
|
" VARIOUS PLUGIN CONFIGURATIONS
|
|
"===================================================================================
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" perl-support.vim
|
|
"-------------------------------------------------------------------------------
|
|
"
|
|
" --empty --
|
|
"
|
|
"-------------------------------------------------------------------------------
|
|
" plugin taglist.vim : toggle the taglist window
|
|
" plugin taglist.vim : define the tag file entry for Perl
|
|
"-------------------------------------------------------------------------------
|
|
"-------------------------------------------------------------------------------
|
|
noremap <silent> <F11> :TlistToggle<CR>
|
|
inoremap <silent> <F11> <C-C>:TlistToggle<CR>
|
|
"
|
|
let tlist_perl_settings = 'perl;c:constants;f:formats;l:labels;p:packages;s:subroutines;d:subroutines;o:POD;k:comments'
|
|
"
|