github.com/xyproto/orbiton/v2@v2.65.12-0.20240516144430-e10a419274ec/test/vimrc (about) 1 " An example for a vimrc file. 2 " 3 " Maintainer: Bram Moolenaar <Bram@vim.org> 4 " Last change: 2001 Jul 18 5 " 6 " To use it, copy it to 7 " for Unix and OS/2: ~/.vimrc 8 " for Amiga: s:.vimrc 9 " for MS-DOS and Win32: $VIM\_vimrc 10 " for OpenVMS: sys$login:.vimrc 11 12 " When started as "evim", evim.vim will already have done these settings. 13 if v:progname =~? "evim" 14 finish 15 endif 16 17 " Use Vim settings, rather then Vi settings (much better!). 18 " This must be first, because it changes other options as a side effect. 19 set nocompatible 20 21 " allow backspacing over everything in insert mode 22 set backspace=indent,eol,start 23 24 set autoindent " always set autoindenting on 25 if has("vms") 26 set nobackup " do not keep a backup file, use versions instead 27 else 28 set backup " keep a backup file 29 endif 30 set history=50 " keep 50 lines of command line history 31 set ruler " show the cursor position all the time 32 set showcmd " display incomplete commands 33 set incsearch " do incremental searching 34 35 " For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries 36 " let &guioptions = substitute(&guioptions, "t", "", "g") 37 38 " Don't use Ex mode, use Q for formatting 39 map Q gq 40 41 " Make p in Visual mode replace the selected text with the "" register. 42 vnoremap p <Esc>:let current_reg = @"<CR>gvs<C-R>=current_reg<CR><Esc> 43 44 " This is an alternative that also works in block mode, but the deleted 45 " text is lost and it only works for putting the current register. 46 "vnoremap p "_dp 47 48 " Switch syntax highlighting on, when the terminal has colors 49 " Also switch on highlighting the last used search pattern. 50 if &t_Co > 2 || has("gui_running") 51 syntax on 52 set hlsearch 53 endif 54 55 " Only do this part when compiled with support for autocommands. 56 if has("autocmd") 57 58 " Enable file type detection. 59 " Use the default filetype settings, so that mail gets 'tw' set to 72, 60 " 'cindent' is on in C files, etc. 61 " Also load indent files, to automatically do language-dependent indenting. 62 filetype plugin indent on 63 64 " For all text files set 'textwidth' to 78 characters. 65 autocmd FileType text setlocal textwidth=78 66 67 " When editing a file, always jump to the last known cursor position. 68 " Don't do it when the position is invalid or when inside an event handler 69 " (happens when dropping a file on gvim). 70 autocmd BufReadPost * 71 \ if line("'\"") > 0 && line("'\"") <= line("$") | 72 \ exe "normal g`\"" | 73 \ endif 74 75 endif " has("autocmd") 76 set nocompatible 77 let s:cpo_save=&cpo 78 set cpo&vim 79 map! <xHome> <Home> 80 map! <xEnd> <End> 81 map! <S-xF4> <S-F4> 82 map! <S-xF3> <S-F3> 83 map! <S-xF2> <S-F2> 84 map! <S-xF1> <S-F1> 85 map! <xF4> <F4> 86 map! <xF3> <F3> 87 map! <xF2> <F2> 88 map! <xF1> <F1> 89 map Q gq 90 vnoremap p :let current_reg = @" gvs=current_reg 91 map <xHome> <Home> 92 map <xEnd> <End> 93 map <S-xF4> <S-F4> 94 map <S-xF3> <S-F3> 95 map <S-xF2> <S-F2> 96 map <S-xF1> <S-F1> 97 map <xF4> <F4> 98 map <xF3> <F3> 99 map <xF2> <F2> 100 map <xF1> <F1> 101 let &cpo=s:cpo_save 102 unlet s:cpo_save 103 set autoindent 104 set background=dark 105 set backspace=indent,eol,start 106 set backup 107 set guifont=-b&h-lucidatypewriter-medium-r-normal-*-*-140-*-*-m-*-iso10646-1 108 set history=50 109 set hlsearch 110 set incsearch 111 set mouse=a 112 set ruler 113 set showcmd 114 if &syntax != 'help' 115 set syntax=help 116 endif 117 set backupdir=~/.backup 118 set vb 119 color desert