Merge branch 'vim-with-runtime' into feat/quickfix-title
[vim_extended.git] / runtime / evim.vim
blob754729048ebc595bf3cbd77237fc9c309339f28f
1 " Vim script for Evim key bindings
2 " Maintainer:   Bram Moolenaar <Bram@vim.org>
3 " Last Change:  2006 Mar 29
5 " Don't use Vi-compatible mode.
6 set nocompatible
8 " Use the mswin.vim script for most mappings
9 source <sfile>:p:h/mswin.vim
11 " Vim is in Insert mode by default
12 set insertmode
14 " Make a buffer hidden when editing another one
15 set hidden
17 " Make cursor keys ignore wrapping
18 inoremap <Down> <C-R>=pumvisible() ? "\<lt>Down>" : "\<lt>C-O>gj"<CR>
19 inoremap <Up> <C-R>=pumvisible() ? "\<lt>Up>" : "\<lt>C-O>gk"<CR>
21 " CTRL-F does Find dialog instead of page forward
22 noremap <C-F> :promptfind<CR>
23 vnoremap <C-F> y:promptfind <C-R>"<CR>
24 onoremap <C-F> <C-C>:promptfind<CR>
25 inoremap <C-F> <C-O>:promptfind<CR>
26 cnoremap <C-F> <C-C>:promptfind<CR>
29 set backspace=2         " allow backspacing over everything in insert mode
30 set autoindent          " always set autoindenting on
31 if has("vms")
32   set nobackup          " do not keep a backup file, use versions instead
33 else
34   set backup            " keep a backup file
35 endif
36 set history=50          " keep 50 lines of command line history
37 set ruler               " show the cursor position all the time
38 set incsearch           " do incremental searching
39 set mouse=a             " always use the mouse
41 " Don't use Ex mode, use Q for formatting
42 map Q gq
44 " Switch syntax highlighting on, when the terminal has colors
45 " Highlight the last used search pattern on the next search command.
46 if &t_Co > 2 || has("gui_running")
47   syntax on
48   set hlsearch
49   nohlsearch
50 endif
52 " Only do this part when compiled with support for autocommands.
53 if has("autocmd")
55   " Enable file type detection.
56   " Use the default filetype settings, so that mail gets 'tw' set to 72,
57   " 'cindent' is on in C files, etc.
58   " Also load indent files, to automatically do language-dependent indenting.
59   filetype plugin indent on
61   " For all text files set 'textwidth' to 78 characters.
62   au FileType text setlocal tw=78
64 endif " has("autocmd")
66 " vim: set sw=2 :