diff options
| author | Max Christian Pohle | 2016-05-24 14:14:54 +0200 |
|---|---|---|
| committer | Max Christian Pohle | 2016-05-24 14:14:54 +0200 |
| commit | fe89b5671d65560b57d51485789c23c38885e28d (patch) | |
| tree | d2483b2b4d80631411fc54ab55609073085c8742 | |
| parent | 4c27c4e8a5d281427bc69fe442ea0f35bd4a53f9 (diff) | |
| download | vim-fe89b5671d65560b57d51485789c23c38885e28d.tar.bz2 vim-fe89b5671d65560b57d51485789c23c38885e28d.zip | |
major update: plugins, colorscheme, shortcuts, new git submodule!
* using nelstroms mac color scheme
* 'fixed' some keyboard shortcuts to behave more like in other editors
* added some plugins
| -rw-r--r-- | .gitmodules | 6 | ||||
| l--------- | colors/mac_classic.vim | 1 | ||||
| m--------- | colors/nelstrom | 0 | ||||
| -rw-r--r-- | doc/list-of-filetypes.txt | 175 | ||||
| -rw-r--r-- | doc/shortcuts.txt | 64 | ||||
| -rw-r--r-- | vimrc | 81 |
6 files changed, 282 insertions, 45 deletions
diff --git a/.gitmodules b/.gitmodules index cdf3d7a..8e27078 100644 --- a/.gitmodules +++ b/.gitmodules | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | [submodule "plugins/Vundle.vim"] | ||
| 2 | path = plugins/Vundle.vim | ||
| 3 | url = https://github.com/VundleVim/Vundle.vim.git | ||
| 4 | [submodule "bundle/Vundle.vim"] | 1 | [submodule "bundle/Vundle.vim"] |
| 5 | path = bundle/Vundle.vim | 2 | path = bundle/Vundle.vim |
| 6 | url = https://github.com/VundleVim/Vundle.vim.git | 3 | url = https://github.com/VundleVim/Vundle.vim.git |
| 4 | [submodule "colors/nelstrom"] | ||
| 5 | path = colors/nelstrom | ||
| 6 | url = https://github.com/nelstrom/vim-mac-classic-theme.git | ||
diff --git a/colors/mac_classic.vim b/colors/mac_classic.vim new file mode 120000 index 0000000..c1f3dc2 --- /dev/null +++ b/colors/mac_classic.vim | |||
| @@ -0,0 +1 @@ | |||
| nelstrom/colors/mac_classic.vim \ No newline at end of file | |||
diff --git a/colors/nelstrom b/colors/nelstrom new file mode 160000 | |||
| Subproject 8bf9e3d96a0988849e8dd9954d443857191c863 | |||
diff --git a/doc/list-of-filetypes.txt b/doc/list-of-filetypes.txt new file mode 100644 index 0000000..9752c6a --- /dev/null +++ b/doc/list-of-filetypes.txt | |||
| @@ -0,0 +1,175 @@ | |||
| 1 | # this list can be generated with ':setfiletype <C-d>'. I have copied it to | ||
| 2 | # make it searchable. | ||
| 3 | |||
| 4 | 2html erlang master sinda | ||
| 5 | HGAnnotate eruby matlab sindacmp | ||
| 6 | PKGBUILD esmtprc maxima sindaout | ||
| 7 | a2ps esqlc mel sisu | ||
| 8 | a65 esterel messages skill | ||
| 9 | aap eterm mf sl | ||
| 10 | abap euphoria3 mgl slang | ||
| 11 | abaqus euphoria4 mgp slice | ||
| 12 | abc eviews mib slim | ||
| 13 | abel exim mix slpconf | ||
| 14 | acedb expect mma slpreg | ||
| 15 | ada exports mmix slpspi | ||
| 16 | aflex falcon mmp slrnrc | ||
| 17 | ahdl fan modconf slrnsc | ||
| 18 | alsaconf fasm model sm | ||
| 19 | amiga fdcc modsim3 smarty | ||
| 20 | aml fetchmail modula2 smcl | ||
| 21 | ampl fgl modula3 smil | ||
| 22 | ansible fish monk smith | ||
| 23 | ansible_hosts flexwiki moo sml | ||
| 24 | ansible_template focexec mp snnsnet | ||
| 25 | ant form mplayerconf snnspat | ||
| 26 | antlr forth mrxvtrc snnsres | ||
| 27 | apache fortran msidl snobol4 | ||
| 28 | apachestyle foxpro msmessages solidity | ||
| 29 | aptconf framescript msql spec | ||
| 30 | arch freebasic mupad specman | ||
| 31 | arduino fstab mush spice | ||
| 32 | art fvwm mustache splint | ||
| 33 | asciidoc fvwm2m4 muttrc spup | ||
| 34 | asm gdb mysql spyce | ||
| 35 | asm68k gdmo named sql | ||
| 36 | asmh8300 gedcom nanorc sqlanywhere | ||
| 37 | asn git nasm sqlforms | ||
| 38 | aspperl gitcommit nastran sqlhana | ||
| 39 | aspvbs gitconfig natural sqlinformix | ||
| 40 | asterisk gitolite ncf sqlj | ||
| 41 | asteriskvm gitrebase netrc sqloracle | ||
| 42 | atlas gitsendemail netrw sqr | ||
| 43 | augeas gkrellmrc nginx squid | ||
| 44 | autohotkey glsl nim srec | ||
| 45 | autoit gnash ninja sshconfig | ||
| 46 | automake gnomecat nix sshdconfig | ||
| 47 | ave gnuplot nosyntax st | ||
| 48 | avra go nqc stata | ||
| 49 | awk godefstack nroff stp | ||
| 50 | ayacc godoc nsis strace | ||
| 51 | b gohtmltmpl obj stylus | ||
| 52 | baan gotexttmpl objc sudoers | ||
| 53 | basic gp objcpp svg | ||
| 54 | bc gpg ocaml svn | ||
| 55 | bdf gprof occam swift | ||
| 56 | bib grads octave syncolor | ||
| 57 | bib_latexSuite gretl omnimark synload | ||
| 58 | bindzone groff opencl syntax | ||
| 59 | blade groovy openroad sysctl | ||
| 60 | blank group opl systemd | ||
| 61 | bst grub ora systemverilog | ||
| 62 | btm gsp pamconf tads | ||
| 63 | bzl gtkrc papp tags | ||
| 64 | bzr haml pascal tak | ||
| 65 | c hamster passwd takcmp | ||
| 66 | cabal handlebars pcap takout | ||
| 67 | calendar haskell pccts tap | ||
| 68 | catalog haste pdf tar | ||
| 69 | cdl hastepreproc perl taskdata | ||
| 70 | cdrdaoconf haxe perl6 taskedit | ||
| 71 | cdrtoc haxe_extended pf tasm | ||
| 72 | cf hb pfmain tcl | ||
| 73 | cfg help pgsql tcsh | ||
| 74 | ch hercules php teraterm | ||
| 75 | chaiscript hex phtml terminfo | ||
| 76 | change hgcommit pic tex | ||
| 77 | changelog hitest pike tex_LatexBox | ||
| 78 | chaskell hog pilrc tex_latexSuite | ||
| 79 | cheetah hostconf pine texinfo | ||
| 80 | chill hostsaccess pinfo texmf | ||
| 81 | chordpro hss plaintex text | ||
| 82 | cl html plantuml textile | ||
| 83 | clean html5 pli tf | ||
| 84 | clipper htmlcheetah plm thrift | ||
| 85 | clojure htmldjango plp tidy | ||
| 86 | cmake htmlm4 plsql tilde | ||
| 87 | cmake-indent htmlos po tli | ||
| 88 | cmake-syntax hxml pod tmux | ||
| 89 | cmusrc ia64 postscr tomdoc | ||
| 90 | cobol ibasic pov toml | ||
| 91 | coco icemenu povini tpp | ||
| 92 | coffee icon ppd trasys | ||
| 93 | color_coded idl ppwiz treetop | ||
| 94 | colortest idlang prescribe trustees | ||
| 95 | conaryrecipe indent privoxy tsalt | ||
| 96 | conf inform procmail tsscl | ||
| 97 | config initex progress tssgm | ||
| 98 | context initng prolog tssop | ||
| 99 | cpp inittab promela tt2 | ||
| 100 | cql ipfilter proto tt2html | ||
| 101 | crm ishd protocols tt2js | ||
| 102 | crontab iss ps1 twig | ||
| 103 | cryptol ist ps1xml typescript | ||
| 104 | crystal j psf uc | ||
| 105 | cs jal ptcap udevconf | ||
| 106 | csc jam pug udevperm | ||
| 107 | cscope_plus jargon puppet udevrules | ||
| 108 | csdl jasmine purescript uil | ||
| 109 | csh java purifylog updatedb | ||
| 110 | csp javacc pyrex upstart | ||
| 111 | css javascript python upstreamdat | ||
| 112 | cterm jess qf upstreaminstalllog | ||
| 113 | ctrlh jgraph qml upstreamlog | ||
| 114 | cucumber jinja2 quake upstreamrpt | ||
| 115 | cuda jovial r usserverlog | ||
| 116 | cupl jproperties racc usw2kagtlog | ||
| 117 | cuplsim json radiance vala | ||
| 118 | cuda jovial r usserverlog | ||
| 119 | cupl jproperties racc usw2kagtlog | ||
| 120 | cuplsim json radiance vala | ||
| 121 | cvs jsp ragel valgrind | ||
| 122 | cvsrc jst ratpoison vb | ||
| 123 | cweb jsx rc vbnet | ||
| 124 | cynlib julia rcs vcl | ||
| 125 | cynpp kconfig rcslog velocity | ||
| 126 | d kivy readline vera | ||
| 127 | dart kix rebol verilog | ||
| 128 | datascript kotlin redif verilogams | ||
| 129 | dcd kscript registry vgrindefs | ||
| 130 | dcl kwt remind vhdl | ||
| 131 | debchangelog lace resolv vim | ||
| 132 | debcontrol latextoc reva vimgo | ||
| 133 | debsources latte rexx viminfo | ||
| 134 | def ld rhelp virata | ||
| 135 | denyhosts ldapconf rib vmasm | ||
| 136 | desc ldif rmd voscm | ||
| 137 | desktop less rnc vrml | ||
| 138 | dictconf lex rng vroom | ||
| 139 | dictdconf lftp rnoweb vsejcl | ||
| 140 | diff lhaskell robots vundlelog | ||
| 141 | dircolors libao rpcgen wdiff | ||
| 142 | dirpager lifelines rpl web | ||
| 143 | diva lilo rrst webmacro | ||
| 144 | django limits rspec wget | ||
| 145 | dns liquid rst whitespace | ||
| 146 | dnsmasq lisp rtf winbatch | ||
| 147 | docbk lite ruby wml | ||
| 148 | docbksgml litestep rust wsh | ||
| 149 | docbkxml logcheck samba wsml | ||
| 150 | dockerfile loginaccess sas wvdial | ||
| 151 | dosbatch logindefs sass xbl | ||
| 152 | dosini logtalk sather xdefaults | ||
| 153 | dot lotos sbt xf86conf | ||
| 154 | doxygen lout scala xhtml | ||
| 155 | dracula lpc scala.xpt xinetd | ||
| 156 | dsl lprolog scheme xkb | ||
| 157 | dtd lscript scilab xmath | ||
| 158 | dtml lsl screen xml | ||
| 159 | dtrace lss scss xmodmap | ||
| 160 | dts lua sd xpm | ||
| 161 | dylan lynx sdc xpm2 | ||
| 162 | dylanintr m4 sdl xquery | ||
| 163 | dylanlid mail sed xs | ||
| 164 | ecd mailaliases sendpr xsd | ||
| 165 | edif mailcap sensors xsl | ||
| 166 | eelixir make services xslt | ||
| 167 | eiffel mallard setserial xxd | ||
| 168 | elf man sgml yacc | ||
| 169 | elinks manconf sgmldecl yaml | ||
| 170 | elixir manual sgmllnx z8a | ||
| 171 | elm maple sh zimbu | ||
| 172 | elmfilt markdown sicad zsh | ||
| 173 | ember-script masm sieve | ||
| 174 | emblem mason simula | ||
| 175 | |||
diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt index 9c168f9..4e49e6d 100644 --- a/doc/shortcuts.txt +++ b/doc/shortcuts.txt | |||
| @@ -1,50 +1,60 @@ | |||
| 1 | leader key = usually set to backslash expects a quick command | ||
| 2 | |||
| 3 | |||
| 1 | [normal mode] | 4 | [normal mode] |
| 2 | f{char} - move cursor to the character {char} | 5 | f{char} = move cursor to the character {char} |
| 3 | 6 | ||
| 4 | 7 | ||
| 5 | [visual mode] - with selected lines | 8 | [visual mode] # with selected lines |
| 6 | gq - formats text so that it fits in whatever :set textwidth was set | 9 | gq = formats text so that it fits in whatever :set textwidth was set |
| 7 | iB - select block between curly braces (:help object-select) | 10 | iB = select block between curly braces (:help object-select) |
| 8 | 11 | ||
| 9 | 12 | ||
| 10 | [commands] | 13 | [commands] |
| 11 | :spell [word] - adds a word to the current dictionary (no mistake any more) | 14 | :spell [word] = adds a word to the current dictionary (no mistake any more) |
| 12 | :set list - display non printable characters | 15 | :set list = display non printable characters |
| 13 | :retab - replaces tabs with spaces | 16 | :retab = replaces tabs with spaces |
| 14 | :set expandtab - in insert mode: replace tab with spaces | 17 | :set expandtab = in insert mode: replace tab with spaces |
| 18 | :Explore = cli version open file dialog | ||
| 15 | 19 | ||
| 16 | 20 | ||
| 17 | [navigation] | 21 | [navigation] |
| 18 | <CTRL-]> - look up the tag under the cursor (help links as well) | 22 | <CTRL-]> = look up the tag under the cursor (help links as well) |
| 19 | <CTRL-T> - return back from tag under the cursor | 23 | <CTRL-T> = return back from tag under the cursor |
| 24 | gd = jump to the declaration of the variable under the cursor | ||
| 20 | 25 | ||
| 21 | 26 | ||
| 22 | [macros] - record and play back a series of vim commands | 27 | [macros] # record and play back a series of vim commands |
| 23 | qa - start (q) macro recording in register a (can be anything) | 28 | qa = start (q) macro recording in register a (can be anything) |
| 24 | q - stop macro recording | 29 | q = stop macro recording |
| 25 | @a - replay macro a | 30 | @a = replay macro a |
| 26 | :'<,'>normal @a - apply a to every line in the current selection | 31 | :'<,'>normal @a = apply a to every line in the current selection |
| 27 | 32 | ||
| 28 | 33 | ||
| 29 | [marker] | 34 | [marker] |
| 30 | ma - set marker a-z (a in this case) | 35 | ma = set marker a-z (a in this case) |
| 31 | 'a - go to marker a | 36 | 'a = go to marker a |
| 32 | 37 | ||
| 33 | 38 | ||
| 34 | [hotkeys] | 39 | [hotkeys] |
| 35 | <C-A>, <C-X> - increment, decrement number under the cursor | 40 | <C-A>, <C-X> = increment, decrement number under the cursor |
| 36 | 41 | ||
| 37 | 42 | ||
| 38 | [windows] | 43 | [windows] |
| 39 | <C-W>v - splits buffer vertically (screen uses |) | 44 | <C-W>v = splits buffer vertically (screen uses |) |
| 40 | <C-W>s - splits buffer horizontally (same as screen) | 45 | <C-W>s = splits buffer horizontally (same as screen) |
| 41 | <C-W>w - moves the cursor to the next window and back | 46 | <C-W>w = moves the cursor to the next window and back |
| 42 | <C-W>[dir] - moves the cursor in that direction (use hjkl or arrow keys) | 47 | <C-W>[dir] = moves the cursor in that direction (use hjkl or arrow keys) |
| 43 | 48 | ||
| 44 | 49 | ||
| 45 | [vimdiff] | 50 | [vimdiff] |
| 46 | do - get changes from other window into the current | 51 | do = get changes from other window into the current |
| 47 | dp - put changes from current window into the other | 52 | dp = put changes from current window into the other |
| 48 | ]c - jump to the next change | 53 | ]c = jump to the next change |
| 49 | [c - jump to the prevous change | 54 | [c = jump to the prevous change |
| 50 | zR - opens all folds (unfold all) | 55 | zR = opens all folds (unfold all) |
| 56 | |||
| 57 | [vim modeline] | ||
| 58 | the last line can be a mode line, which holds settings like tab width: | ||
| 59 | |||
| 60 | # vim: noai:ts=2:sw=2 filetype=dosini | ||
| @@ -7,22 +7,30 @@ set rtp+=~/.vim/bundle/Vundle.vim | " set runtimepath (requir | |||
| 7 | call vundle#begin('~/.vim/bundle/') | " location where Vundle searches&installs plugins | 7 | call vundle#begin('~/.vim/bundle/') | " location where Vundle searches&installs plugins |
| 8 | 8 | ||
| 9 | " Plugin dependant configurations... | 9 | " Plugin dependant configurations... |
| 10 | Plugin 'VundleVim/Vundle.vim' | " Vundle itself (required) | 10 | Plugin 'Valloric/YouCompleteMe' | " syntax checker and code completion |
| 11 | Plugin 'cscope_plus.vim' | " run cscope -R -b in project folder then use | 11 | Plugin 'cscope_plus.vim' | " run cscope -R -b in project folder then use |
| 12 | Plugin 'autoload_cscope.vim' | " CTRL+\ s searches word under cursor, CTRL+T back | 12 | Plugin 'autoload_cscope.vim' | " CTRL+\ s searches word under cursor, CTRL+T back |
| 13 | Plugin 'tpope/vim-fugitive' | " the most complete GIT integration plugin | 13 | Plugin 'tpope/vim-fugitive' | " the most complete GIT integration plugin |
| 14 | Plugin 'jeaye/color_coded' | " semantic highlighting with vim | 14 | Plugin 'jeaye/color_coded' | " semantic highlighting with vim |
| 15 | Plugin 'terryma/vim-multiple-cursors' | " displays visual block mode as cursors | 15 | Plugin 'terryma/vim-multiple-cursors' | " displays visual block mode as cursors |
| 16 | |||
| 17 | Plugin 'taglist-plus' | " quick code navigator | 16 | Plugin 'taglist-plus' | " quick code navigator |
| 18 | Plugin 'jdonaldson/vaxe' | " code completion for haxe | 17 | Plugin 'jdonaldson/vaxe' | " code completion for haxe |
| 19 | Plugin 'sheerun/vim-polyglot' | " better syntax highlighting/indentation for multiple languages | 18 | Plugin 'sheerun/vim-polyglot' | " better syntax highlighting/indentation for multiple languages |
| 20 | Plugin 'loremipsum' | " Sample text generator | 19 | Plugin 'loremipsum' | " Sample text generator |
| 20 | Plugin 'vim-airline/vim-airline' | " beautification of the mode line | ||
| 21 | Plugin 'nathanaelkane/vim-indent-guides' | " shows indentation guidelines by pressing <leader>ig | ||
| 22 | Plugin 'gregsexton/matchtag' | " highlights closing ML tags like braces | ||
| 23 | Plugin 'indenthtml.vim' | " works better with mixed html/css/javascript | ||
| 24 | Plugin 'easymotion/vim-easymotion' | " speed up navigation: try \\w or \\f, then one of the highlighted chars | ||
| 25 | Plugin 'tpope/vim-surround' | " plugin makes cs"' inside a line replace " with ' | ||
| 26 | |||
| 27 | |||
| 28 | |||
| 21 | let Tlist_Compact_Format = 1 | " | 29 | let Tlist_Compact_Format = 1 | " |
| 22 | let Tlist_GainFocus_On_ToggleOpen = 1 | " | 30 | let Tlist_GainFocus_On_ToggleOpen = 1 | " |
| 23 | let Tlist_Close_On_Select = 1 | " | 31 | let Tlist_Close_On_Select = 1 | " |
| 24 | 32 | ||
| 25 | Plugin 'Valloric/YouCompleteMe' | " syntax checker and code completion | 33 | Plugin 'VundleVim/Vundle.vim' | " Vundle itself (required) |
| 26 | let g:ycm_global_ycm_extra_conf = '~/.vim/ycm_extra_conf.py' | " fallback, right one should be in the applications path | 34 | let g:ycm_global_ycm_extra_conf = '~/.vim/ycm_extra_conf.py' | " fallback, right one should be in the applications path |
| 27 | let g:ycm_confirm_extra_conf = 0 | " disable 'do you really want to execute .py?' | 35 | let g:ycm_confirm_extra_conf = 0 | " disable 'do you really want to execute .py?' |
| 28 | let g:ycm_key_select_completion = '<Tab>' | " key completion key | 36 | let g:ycm_key_select_completion = '<Tab>' | " key completion key |
| @@ -34,12 +42,27 @@ let g:ycm_autoclose_preview_window_after_insertion=1 | " close the window when | |||
| 34 | 42 | ||
| 35 | let b:html_omni_flavor='xhtml' | " prever xhtml over html because that makes inline php code possible without hassle | 43 | let b:html_omni_flavor='xhtml' | " prever xhtml over html because that makes inline php code possible without hassle |
| 36 | let html_use_css = 1 | " when using :TOhtml no font-tags will be used, but proper css | 44 | let html_use_css = 1 | " when using :TOhtml no font-tags will be used, but proper css |
| 45 | let g:vim_markdown_folding_disabled=1 | " disable code folding with vimdiff (also see set nofoldenable) | ||
| 46 | |||
| 47 | let g:netrw_liststyle=3 | " Explore mode: 3 shows a complete tree instead of the current directory | ||
| 48 | let g:netrw_list_hide='^\..*' | " Explore mode: hide files starting with dot | ||
| 49 | |||
| 50 | |||
| 51 | " speed up CTRL-P Menu... | ||
| 52 | let g:ctrlp_user_command = 'ag %s -i --nocolor --nogroup --hidden | ||
| 53 | \ --ignore .git | ||
| 54 | \ --ignore .svn | ||
| 55 | \ --ignore .hg | ||
| 56 | \ --ignore .DS_Store | ||
| 57 | \ --ignore "**/*.pyc" | ||
| 58 | \ -g ""' | ||
| 37 | 59 | ||
| 38 | call vundle#end() | " required by Vundle | 60 | call vundle#end() | " required by Vundle |
| 39 | filetype plugin indent on | " required by Vundle | 61 | filetype plugin indent on | " required by Vundle |
| 40 | "================================================================================ | 62 | "================================================================================ |
| 41 | " custom config | 63 | " custom config |
| 42 | colorscheme coderonline | 64 | colorscheme mac_classic |
| 65 | " colorscheme coderonline | ||
| 43 | syntax enable | 66 | syntax enable |
| 44 | 67 | ||
| 45 | set noswapfile | " noundofile, nobackup, nowritebackup | 68 | set noswapfile | " noundofile, nobackup, nowritebackup |
| @@ -57,7 +80,7 @@ set selection=exclusive | " includes last character of the selection into | |||
| 57 | 80 | ||
| 58 | set whichwrap=b,s,<,>,[,] | " beyond beginning/end line causes cusor to wrap | 81 | set whichwrap=b,s,<,>,[,] | " beyond beginning/end line causes cusor to wrap |
| 59 | set backspace=indent,eol,start| " allow backspacing over everything in insert mode, not needed with whichwrap | 82 | set backspace=indent,eol,start| " allow backspacing over everything in insert mode, not needed with whichwrap |
| 60 | set diffopt+=iwhite,filler | " lets diff ignore white spaces | 83 | set diffopt+=vertical,iwhite,filler | " lets diff ignore white spaces |
| 61 | set spell spelllang=en,de | " enable spell checker | 84 | set spell spelllang=en,de | " enable spell checker |
| 62 | set virtualedit=onemore | " one character beyond the line length should be navigatable (options: all,insert,block,onemore) | 85 | set virtualedit=onemore | " one character beyond the line length should be navigatable (options: all,insert,block,onemore) |
| 63 | set breakindent cpoptions+=n | " when wrapping lines indent wrapped line to align with the previews | 86 | set breakindent cpoptions+=n | " when wrapping lines indent wrapped line to align with the previews |
| @@ -66,6 +89,7 @@ set showcmd | " displays status line messages while selecting | |||
| 66 | set nofoldenable | " do not fold code automatically | 89 | set nofoldenable | " do not fold code automatically |
| 67 | set tags+=~/.vim/systags | " ctags -R -f ~/.vim/systags /usr/include /usr/local/include | 90 | set tags+=~/.vim/systags | " ctags -R -f ~/.vim/systags /usr/include /usr/local/include |
| 68 | set wildmenu wildmode=full | " wildmenu code completion | 91 | set wildmenu wildmode=full | " wildmenu code completion |
| 92 | set guifont="Droid Sans Mono for Powerline 10" | ||
| 69 | 93 | ||
| 70 | " search... | 94 | " search... |
| 71 | set ignorecase smartcase | " if search pattern contains uppercase then search is case sensitive | 95 | set ignorecase smartcase | " if search pattern contains uppercase then search is case sensitive |
| @@ -76,6 +100,10 @@ set novisualbell | " don't beep | |||
| 76 | set noerrorbells | " don't beep | 100 | set noerrorbells | " don't beep |
| 77 | set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) | 101 | set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) |
| 78 | set number | " toggle line numbers | 102 | set number | " toggle line numbers |
| 103 | set formatprg=par | " set external formatting program to par, use gwip to format with this | ||
| 104 | set laststatus=2 | " this is required for airline | ||
| 105 | set cmdheight=1 | " controls how many lines the command line has | ||
| 106 | set relativenumber | " displays current lines line no as zero point from where relative numbers are getting counted | ||
| 79 | 107 | ||
| 80 | if has("multi_byte") | 108 | if has("multi_byte") |
| 81 | set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below) | 109 | set encoding=utf-8 | " we need default utf-8 encoding to use cool chars as line break and so on (see below) |
| @@ -108,6 +136,7 @@ if has("autocmd") | |||
| 108 | \ setlocal omnifunc=syntaxcomplete#Complete | | 136 | \ setlocal omnifunc=syntaxcomplete#Complete | |
| 109 | \ setlocal completeopt=longest,menuone | | 137 | \ setlocal completeopt=longest,menuone | |
| 110 | \ endif | 138 | \ endif |
| 139 | autocmd FileType html set omnifunc=htmlcomplete#CompleteTags | ||
| 111 | endif | 140 | endif |
| 112 | augroup END | 141 | augroup END |
| 113 | 142 | ||
| @@ -158,6 +187,30 @@ endif | |||
| 158 | 187 | ||
| 159 | "================================================================================ | 188 | "================================================================================ |
| 160 | " custom commands... | 189 | " custom commands... |
| 190 | " | ||
| 191 | " assign selection keys (these i missed a lot) | ||
| 192 | nmap <S-Left> vh| " shift-left selects to the left | ||
| 193 | xmap <S-Left> h| " ^^ | ||
| 194 | nmap <S-Right> vl| " shift-right selects to the right | ||
| 195 | xmap <S-Right> l| " ^^ | ||
| 196 | nmap <S-Up> vk| " shift-up selects like other text editors | ||
| 197 | xmap <S-Up> k| " ^^ | ||
| 198 | nmap <S-Down> vj| " shift down selects like other text editors | ||
| 199 | xmap <S-Down> j| " ^^ | ||
| 200 | nmap <Home> ^| " default homing in code editors is the first letter of a line | ||
| 201 | xmap <Home> 0| " go to the beginning of the line | ||
| 202 | xmap <S-Home> 0| " ^^ | ||
| 203 | xmap <Tab> >gv| " indent lines (and retain selection) | ||
| 204 | xmap <S-Tab> <gv| " unindent lines (and retain selection) | ||
| 205 | nmap <S-PageUp> VH| " selects predessing paragraph | ||
| 206 | nmap <S-PageDown> VL| " selects following paragraph | ||
| 207 | nmap <C-S-PageUp> V{| " selects predessing paragraph | ||
| 208 | nmap <C-S-PageDown> V}| " selects following paragraph | ||
| 209 | |||
| 210 | |||
| 211 | |||
| 212 | |||
| 213 | |||
| 161 | map <C-h> <C-w>h|map <C-j> <C-w>j| " window navigation shortcuts | 214 | map <C-h> <C-w>h|map <C-j> <C-w>j| " window navigation shortcuts |
| 162 | map <C-k> <C-w>k|map <C-l> <C-w>l| " window navigation shortcuts | 215 | map <C-k> <C-w>k|map <C-l> <C-w>l| " window navigation shortcuts |
| 163 | 216 | ||
| @@ -171,15 +224,14 @@ nnoremap j gj|nnoremap k gk| " do not jump over wrapped lines | |||
| 171 | 224 | ||
| 172 | nnoremap $ g$| " and make the $ key position the cursor after the last char of that line, not before | 225 | nnoremap $ g$| " and make the $ key position the cursor after the last char of that line, not before |
| 173 | nnoremap <End> g$| " and make the <End> key position the cursor after the last char of that line | 226 | nnoremap <End> g$| " and make the <End> key position the cursor after the last char of that line |
| 174 | function ExtendedHome() | 227 | " function ExtendedHome() |
| 175 | let column = col('.') | 228 | " let column = col('.') |
| 176 | normal! ^ | 229 | " normal! ^ |
| 177 | if column == col('.') | 230 | " if column == col('.') |
| 178 | normal! 0 | 231 | " normal! 0 |
| 179 | endif | 232 | " endif |
| 180 | endfunction | 233 | " endfunction |
| 181 | noremap <Home> ^ | 234 | " noremap <silent> <Home> :call ExtendedHome()<CR> |
| 182 | noremap <silent> <Home> :call ExtendedHome()<CR> | ||
| 183 | 235 | ||
| 184 | nnoremap <C-z> u | 236 | nnoremap <C-z> u |
| 185 | 237 | ||
| @@ -198,7 +250,6 @@ inoremap <buffer> ( <C-X><C-o><C-p>(| " when opening a bracket: call the OmniCo | |||
| 198 | set makeprg=make\ test | 250 | set makeprg=make\ test |
| 199 | nnoremap <F5> :!make<CR>| " classic key binding: press F5 to compile and execute (if you have a Makefile with make test doing that) | 251 | nnoremap <F5> :!make<CR>| " classic key binding: press F5 to compile and execute (if you have a Makefile with make test doing that) |
| 200 | 252 | ||
| 201 | |||
| 202 | "================================================================================ | 253 | "================================================================================ |
| 203 | " deactivated on-demand commands (just in case one needs them one day) | 254 | " deactivated on-demand commands (just in case one needs them one day) |
| 204 | " | 255 | " |
