diff options
author | Silvino Silva <silvino@bk.ru> | 2016-08-20 07:16:45 +0100 |
---|---|---|
committer | Silvino Silva <silvino@bk.ru> | 2016-08-20 07:16:45 +0100 |
commit | 05c1ad5f7378e421f8ea06fb55e44ec773f0f055 (patch) | |
tree | 8028df26ff358e9d7301f546676f0d21e48538fc /conf/skel | |
parent | c178db81d64eed21177b4c5d78ab3db7a785b7fe (diff) | |
download | doc-05c1ad5f7378e421f8ea06fb55e44ec773f0f055.tar.gz |
added skeletons to install
Diffstat (limited to 'conf/skel')
-rw-r--r-- | conf/skel/.bash_profile | 8 | ||||
-rw-r--r-- | conf/skel/.bashrc | 57 | ||||
-rw-r--r-- | conf/skel/.gnupg/gpg.conf | 141 | ||||
-rw-r--r-- | conf/skel/.mutt/external | 27 | ||||
-rw-r--r-- | conf/skel/.mutt/gpg.rc | 88 | ||||
-rw-r--r-- | conf/skel/.mutt/mail_alias | 0 | ||||
-rw-r--r-- | conf/skel/.mutt/muttrc | 65 | ||||
-rw-r--r-- | conf/skel/.mutt/system | 25 | ||||
-rw-r--r-- | conf/skel/.profile | 6 | ||||
-rw-r--r-- | conf/skel/.tmux.conf | 25 | ||||
-rw-r--r-- | conf/skel/.vim/backup/.gitignore | 0 | ||||
-rw-r--r-- | conf/skel/.vim/colors/wombat256mod.vim | 96 | ||||
-rw-r--r-- | conf/skel/.vim/swap/.gitignore | 0 | ||||
-rw-r--r-- | conf/skel/.vim/undodir/.gitignore | 0 | ||||
-rw-r--r-- | conf/skel/.vim/views/.gitignore | 0 | ||||
-rw-r--r-- | conf/skel/.vimrc | 150 |
16 files changed, 688 insertions, 0 deletions
diff --git a/conf/skel/.bash_profile b/conf/skel/.bash_profile new file mode 100644 index 0000000..9ea6954 --- /dev/null +++ b/conf/skel/.bash_profile @@ -0,0 +1,8 @@ +#!/bin/bash +if [ -f ~/.profile ]; then + source ~/.profile +fi + +if [ -f ~/.bashrc ]; then + source ~/.bashrc +fi diff --git a/conf/skel/.bashrc b/conf/skel/.bashrc new file mode 100644 index 0000000..38f4b24 --- /dev/null +++ b/conf/skel/.bashrc @@ -0,0 +1,57 @@ +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +alias tmux="tmux -2" + +alias rm='rm -i' +#alias cp='cp -i' +alias mv='mv -i' +# Prevents accidentally clobbering files. +alias mkdir='mkdir -p' + +alias h='history' +alias j='jobs -l' +alias which='type -a' +alias ..='cd ..' + +# Generate a password +genpasswd () { + local l=$1 + [ "$l" == "" ] && l=20 + tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs +} + +# Git graph log +glog () { + git log --graph --abbrev-commit --decorate --date=relative --all +} + +if [[ -z "$TMUX" ]] ;then + ID="`tmux ls | grep -vm1 attached | cut -d: -f1`" # get the id of a deattached session + if [[ -z "$ID" ]] ;then # if not available create a new one + tmux new-session + else + tmux attach-session -t "$ID" # if available attach to it + fi +fi + diff --git a/conf/skel/.gnupg/gpg.conf b/conf/skel/.gnupg/gpg.conf new file mode 100644 index 0000000..20eed65 --- /dev/null +++ b/conf/skel/.gnupg/gpg.conf @@ -0,0 +1,141 @@ +# These first three lines are not copied to the gpg.conf file in +# the users home directory. +# $Id$ +# Options for GnuPG +# Copyright 1998-2003, 2010 Free Software Foundation, Inc. +# Copyright 1998-2003, 2010 Werner Koch +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This file is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Unless you specify which option file to use (with the command line +# option "--options filename"), GnuPG uses the file ~/.gnupg/gpg.conf +# by default. +# +# An options file can contain any long options which are available in +# GnuPG. If the first non white space character of a line is a '#', +# this line is ignored. Empty lines are also ignored. +# +# See the gpg man page for a list of options. + + +# If you have more than 1 secret key in your keyring, you may want to +# uncomment the following option and set your preferred keyid. + +#default-key 621CC013 + + +# If you do not pass a recipient to gpg, it will ask for one. Using +# this option you can encrypt to a default key. Key validation will +# not be done in this case. The second form uses the default key as +# default recipient. + +#default-recipient some-user-id +#default-recipient-self + + +# Group names may be defined like this: +# group mynames = paige 0x12345678 joe patti +# +# Any time "mynames" is a recipient (-r or --recipient), it will be +# expanded to the names "paige", "joe", and "patti", and the key ID +# "0x12345678". Note there is only one level of expansion - you +# cannot make an group that points to another group. Note also that +# if there are spaces in the recipient name, this will appear as two +# recipients. In these cases it is better to use the key ID. + +#group mynames = paige 0x12345678 joe patti + + +# GnuPG can automatically locate and retrieve keys as needed using +# this option. This happens when encrypting to an email address (in +# the "user@@example.com" form) and there are no keys matching +# "user@example.com" in the local keyring. This option takes any +# number mechanisms which are tried in the given order. The default +# is "--auto-key-locate local" to search for keys only in the local +# key database. Uncomment the next line to locate a missing key using +# two DNS based mechanisms. + +#auto-key-locate local,pka,dane + + +# Common options for keyserver functions: +# (Note that the --keyserver option has been moved to dirmngr.conf) +# +# include-disabled = when searching, include keys marked as "disabled" +# on the keyserver (not all keyservers support this). +# +# no-include-revoked = when searching, do not include keys marked as +# "revoked" on the keyserver. +# +# verbose = show more information as the keys are fetched. +# Can be used more than once to increase the amount +# of information shown. +# +# auto-key-retrieve = automatically fetch keys as needed from the keyserver +# when verifying signatures or when importing keys that +# have been revoked by a revocation key that is not +# present on the keyring. +# +# no-include-attributes = do not include attribute IDs (aka "photo IDs") +# when sending keys to the keyserver. + +keyserver-options auto-key-retrieve +#keyserver wwwkeys.pgp.net +#keyserver search.keyserver.net +keyserver pgp.mit.edu + +# Uncomment this line to display photo user IDs in key listings and +# when a signature from a key with a photo is verified. + +#show-photos + + +# Use this program to display photo user IDs +# +# %i is expanded to a temporary file that contains the photo. +# %I is the same as %i, but the file isn't deleted afterwards by GnuPG. +# %k is expanded to the key ID of the key. +# %K is expanded to the long OpenPGP key ID of the key. +# %t is expanded to the extension of the image (e.g. "jpg"). +# %T is expanded to the MIME type of the image (e.g. "image/jpeg"). +# %f is expanded to the fingerprint of the key. +# %% is %, of course. +# +# If %i or %I are not present, then the photo is supplied to the +# viewer on standard input. If your platform supports it, standard +# input is the best way to do this as it avoids the time and effort in +# generating and then cleaning up a secure temp file. +# +# The default program is "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin" +# On Mac OS X and Windows, the default is to use your regular JPEG image +# viewer. +# +# Some other viewers: +# photo-viewer "qiv %i" +# photo-viewer "ee %i" +# photo-viewer "display -title 'KeyID 0x%k'" +# +# This one saves a copy of the photo ID in your home directory: +# photo-viewer "cat > ~/photoid-for-key-%k.%t" +# +# Use your MIME handler to view photos: +# photo-viewer "metamail -q -d -b -c %T -s 'KeyID 0x%k' -f GnuPG" + + +# Because some mailers change lines starting with "From " to ">From " +# it is good to handle such lines in a special way when creating +# cleartext signatures; all other PGP versions do it this way too. +# To enable full OpenPGP compliance you may want to use this option. + +#no-escape-from-lines + + +# Uncomment the following option to get rid of the copyright notice + +#no-greeting diff --git a/conf/skel/.mutt/external b/conf/skel/.mutt/external new file mode 100644 index 0000000..8ade1b1 --- /dev/null +++ b/conf/skel/.mutt/external @@ -0,0 +1,27 @@ +color status blue default + +unset sendmail + +set folder="~/.mailext" +set mbox_type=Maildir +set spoolfile="~/.mailext" +set keep_flagged=yes # esc-f to mark messages in spool, and + +set mbox="~/.mailext" +set postponed="+.Drafts" +set record="+.Sent" + +set use_from=yes +set ssl_starttls=yes +set ssl_force_tls = yes + +set realname='User Name' +set from=mail@external.org + +set pop_user="mail@external.org" +set pop_pass="password" +set pop_delete=yes +set pop_host="pops://$pop_user:$pop_pass@pop.external.org:995" + +set smtp_url="smtps://$pop_user:$pop_pass@smtp.external.org/" + diff --git a/conf/skel/.mutt/gpg.rc b/conf/skel/.mutt/gpg.rc new file mode 100644 index 0000000..2ef0ae2 --- /dev/null +++ b/conf/skel/.mutt/gpg.rc @@ -0,0 +1,88 @@ +# -*-muttrc-*- +# +# Command formats for gpg. +# +# This version uses gpg-2comp from +# http://70t.de/download/gpg-2comp.tar.gz +# +# $Id$ +# +# %p The empty string when no passphrase is needed, +# the string "PGPPASSFD=0" if one is needed. +# +# This is mostly used in conditional % sequences. +# +# %f Most PGP commands operate on a single file or a file +# containing a message. %f expands to this file's name. +# +# %s When verifying signatures, there is another temporary file +# containing the detached signature. %s expands to this +# file's name. +# +# %a In "signing" contexts, this expands to the value of the +# configuration variable $pgp_sign_as. You probably need to +# use this within a conditional % sequence. +# +# %r In many contexts, mutt passes key IDs to pgp. %r expands to +# a list of key IDs. + +# Note that we explicitly set the comment armor header since GnuPG, when used +# in some localiaztion environments, generates 8bit data in that header, thereby +# breaking PGP/MIME. + +# decode application/pgp +set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" + +# verify a pgp/mime signature +set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f" + +# decrypt a pgp/mime attachment +set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f" + +# create a pgp/mime signed attachment +# set pgp_sign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" +set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f" + +# create a application/pgp signed (old-style) message +# set pgp_clearsign_command="gpg-2comp --comment '' --no-verbose --batch --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" +set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f" + +# create a pgp/mime encrypted attachment +# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" + +# create a pgp/mime encrypted and signed attachment +# set pgp_encrypt_sign_command="pgpewrap gpg-2comp %?p?--passphrase-fd 0? -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" +set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" + +# import a key into the public key ring +set pgp_import_command="gpg --no-verbose --import %f" + +# export a key from the public key ring +set pgp_export_command="gpg --no-verbose --export --armor %r" + +# verify a key +set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r" + +# read in the public key ring +set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-keys %r" + +# read in the secret key ring +set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --with-fingerprint --with-fingerprint --list-secret-keys %r" + +# fetch keys +# set pgp_getkeys_command="pkspxycwrap %r" + +# pattern for good signature - may need to be adapted to locale! + +# set pgp_good_sign="^gpgv?: Good signature from " + +# OK, here's a version which uses gnupg's message catalog: +# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`" + +# This version uses --status-fd messages +set pgp_good_sign="^\\[GNUPG:\\] GOODSIG" + +# pattern to verify a decryption occurred +set pgp_decryption_okay="^\\[GNUPG:\\] DECRYPTION_OKAY" + diff --git a/conf/skel/.mutt/mail_alias b/conf/skel/.mutt/mail_alias new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/conf/skel/.mutt/mail_alias diff --git a/conf/skel/.mutt/muttrc b/conf/skel/.mutt/muttrc new file mode 100644 index 0000000..a56757e --- /dev/null +++ b/conf/skel/.mutt/muttrc @@ -0,0 +1,65 @@ +set config_charset="utf-8" +# set locale="de_CH" +set charset="utf-8" +set send_charset="utf-8" +set editor="vim" +set visual=vim +set auto_tag +set sort=threads + +set sort_browser=reverse-date +set sort_aux=reverse-last-date-received +set duplicate_threads=yes + +source ~/.mutt/gpg.rc + +set pgp_autosign=yes +set pgp_sign_as=0x1D327CA1 +set pgp_replyencrypt=yes +set pgp_timeout=1800 + +# automatically sign all outgoing messages +set crypt_autosign + +# sign only replies to signed messages +set crypt_replysign + +# automatically encrypt outgoing messages +#set crypt_autoencrypt=yes + +# encrypt only replies to signed messages +set crypt_replyencrypt=yes + +# encrypt and sign replies to encrypted messages +set crypt_replysignencrypted=yes + +# automatically verify the sign of a message when opened +set crypt_verify_sig=yes + +source "~/.mutt/mail_alias" +set alias_file=~/.mutt/mail_alias + +# Header +set header_cache =~/.mutt/cache/headers +set message_cachedir =~/.mutt/cache/bodies +set certificate_file =~/.mutt/certificates + +set timeout=10 # mutt 'presses' (like) a key for you + #(while you're idle) each x sec to trigger + #the thing below +set mail_check=5 # mutt checks for new mails on every keystroke + # but not more often then once in 5 seconds +set beep_new # beep on new messages in the mailboxes + +## Local system account +folder-hook 'Mail' 'source ~/.mutt/system' + +## Remote account +folder-hook 'MailExt' 'source ~/.mutt/external' + +## Default account +source "~/.mutt/system" + +## Shortcuts +macro index,pager <f2> '<sync-mailbox><enter-command>source ~/.mutt/system<enter><change-folder>!<enter>' +macro index,pager <f3> '<sync-mailbox><enter-command>source ~/.mutt/external<enter><change-folder>!<enter>' diff --git a/conf/skel/.mutt/system b/conf/skel/.mutt/system new file mode 100644 index 0000000..ae23778 --- /dev/null +++ b/conf/skel/.mutt/system @@ -0,0 +1,25 @@ +color status green default + +set folder="~/.mail" +set mbox_type=Maildir +set spoolfile=/var/spool/mail/username +set keep_flagged=yes + +set mbox="~/.mail" # ~/.mailext/read_inbox +set postponed="+.Drafts" +set record="+.Sent" + +set use_from=yes + +set sendmail=/usr/sbin/exim +set ssl_starttls=no +set ssl_force_tls=no + +unset pop_user +unset pop_pass +unset pop_delete +unset pop_host +unset smtp_url + +set realname='username' +set from=username@localhost diff --git a/conf/skel/.profile b/conf/skel/.profile new file mode 100644 index 0000000..58f821e --- /dev/null +++ b/conf/skel/.profile @@ -0,0 +1,6 @@ +export GPG_AGENT_INFO # the env file does not contain the export statement +export SSH_AUTH_SOCK # enable gpg-agent for ssh + +export GPGKEY=EE29B7D3 + +alias prodtmux="ssh prod -t tmux a" diff --git a/conf/skel/.tmux.conf b/conf/skel/.tmux.conf new file mode 100644 index 0000000..795aff6 --- /dev/null +++ b/conf/skel/.tmux.conf @@ -0,0 +1,25 @@ +set -g default-terminal "screen-256color" + +set-window-option -g mode-keys vi + +# Vim style +# copy tmux's selection buffer into the primary X selection with PREFIX+CTRL+Y +bind-key u run "tmux save-buffer - | xsel -ib" +# copy primary X selection into tmux's selection buffer with PREFIX+CTRL+P +bind-key e run "xsel -o | tmux load-buffer -" + +bind-key -t vi-copy 'v' begin-selection +bind-key -t vi-copy 'y' copy-selection + +set-option -g set-titles on +set-option -g set-titles-string '#S> #I.#P #W' + +set -g visual-activity on +set -g monitor-activity on +set -g visual-bell on +set -g bell-action any + +## Join windows: <prefix> s, <prefix> j +bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'" +bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'" + diff --git a/conf/skel/.vim/backup/.gitignore b/conf/skel/.vim/backup/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/conf/skel/.vim/backup/.gitignore diff --git a/conf/skel/.vim/colors/wombat256mod.vim b/conf/skel/.vim/colors/wombat256mod.vim new file mode 100644 index 0000000..1137eb8 --- /dev/null +++ b/conf/skel/.vim/colors/wombat256mod.vim @@ -0,0 +1,96 @@ +" Vim color file +" Original Maintainer: Lars H. Nielsen (dengmao@gmail.com) +" Last Change: 2010-07-23 +" +" Modified version of wombat for 256-color terminals by +" David Liang (bmdavll@gmail.com) +" based on version by +" Danila Bespalov (danila.bespalov@gmail.com) + +set background=dark + +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif + +let colors_name = "wombat256mod" + + +" General colors +hi Normal ctermfg=252 ctermbg=234 cterm=none guifg=#e3e0d7 guibg=#242424 gui=none +hi Cursor ctermfg=234 ctermbg=228 cterm=none guifg=#242424 guibg=#eae788 gui=none +hi Visual ctermfg=251 ctermbg=239 cterm=none guifg=#c3c6ca guibg=#554d4b gui=none +hi VisualNOS ctermfg=251 ctermbg=236 cterm=none guifg=#c3c6ca guibg=#303030 gui=none +hi Search ctermfg=177 ctermbg=241 cterm=none guifg=#d787ff guibg=#636066 gui=none +hi Folded ctermfg=103 ctermbg=237 cterm=none guifg=#a0a8b0 guibg=#3a4046 gui=none +hi Title ctermfg=230 cterm=bold guifg=#ffffd7 gui=bold +hi StatusLine ctermfg=230 ctermbg=238 cterm=none guifg=#ffffd7 guibg=#444444 gui=italic +hi VertSplit ctermfg=238 ctermbg=238 cterm=none guifg=#444444 guibg=#444444 gui=none +hi StatusLineNC ctermfg=241 ctermbg=238 cterm=none guifg=#857b6f guibg=#444444 gui=none +hi LineNr ctermfg=241 ctermbg=232 cterm=none guifg=#857b6f guibg=#080808 gui=none +hi SpecialKey ctermfg=241 ctermbg=235 cterm=none guifg=#626262 guibg=#2b2b2b gui=none +hi WarningMsg ctermfg=203 guifg=#ff5f55 +hi ErrorMsg ctermfg=196 ctermbg=236 cterm=bold guifg=#ff2026 guibg=#3a3a3a gui=bold + +" Vim >= 7.0 specific colors +if version >= 700 +hi CursorLine ctermbg=236 cterm=none guibg=#32322f +hi MatchParen ctermfg=228 ctermbg=101 cterm=bold guifg=#eae788 guibg=#857b6f gui=bold +hi Pmenu ctermfg=230 ctermbg=238 guifg=#ffffd7 guibg=#444444 +hi PmenuSel ctermfg=232 ctermbg=192 guifg=#080808 guibg=#cae982 +endif + +" Diff highlighting +hi DiffAdd ctermbg=17 guibg=#2a0d6a +hi DiffDelete ctermfg=234 ctermbg=60 cterm=none guifg=#242424 guibg=#3e3969 gui=none +hi DiffText ctermbg=53 cterm=none guibg=#73186e gui=none +hi DiffChange ctermbg=237 guibg=#382a37 + +"hi CursorIM +"hi Directory +"hi IncSearch +"hi Menu +"hi ModeMsg +"hi MoreMsg +"hi PmenuSbar +"hi PmenuThumb +"hi Question +"hi Scrollbar +"hi SignColumn +"hi SpellBad +"hi SpellCap +"hi SpellLocal +"hi SpellRare +"hi TabLine +"hi TabLineFill +"hi TabLineSel +"hi Tooltip +"hi User1 +"hi User9 +"hi WildMenu + + +" Syntax highlighting +hi Keyword ctermfg=111 cterm=none guifg=#88b8f6 gui=none +hi Statement ctermfg=111 cterm=none guifg=#88b8f6 gui=none +hi Constant ctermfg=173 cterm=none guifg=#e5786d gui=none +hi Number ctermfg=173 cterm=none guifg=#e5786d gui=none +hi PreProc ctermfg=173 cterm=none guifg=#e5786d gui=none +hi Function ctermfg=192 cterm=none guifg=#cae982 gui=none +hi Identifier ctermfg=192 cterm=none guifg=#cae982 gui=none +hi Type ctermfg=186 cterm=none guifg=#d4d987 gui=none +hi Special ctermfg=229 cterm=none guifg=#eadead gui=none +hi String ctermfg=113 cterm=none guifg=#95e454 gui=italic +hi Comment ctermfg=246 cterm=none guifg=#9c998e gui=italic +hi Todo ctermfg=101 cterm=none guifg=#857b6f gui=italic + + +" Links +hi! link FoldColumn Folded +hi! link CursorColumn CursorLine +hi! link NonText LineNr + +" vim:set ts=4 sw=4 noet: diff --git a/conf/skel/.vim/swap/.gitignore b/conf/skel/.vim/swap/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/conf/skel/.vim/swap/.gitignore diff --git a/conf/skel/.vim/undodir/.gitignore b/conf/skel/.vim/undodir/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/conf/skel/.vim/undodir/.gitignore diff --git a/conf/skel/.vim/views/.gitignore b/conf/skel/.vim/views/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/conf/skel/.vim/views/.gitignore diff --git a/conf/skel/.vimrc b/conf/skel/.vimrc new file mode 100644 index 0000000..cf143fd --- /dev/null +++ b/conf/skel/.vimrc @@ -0,0 +1,150 @@ +" An example for a vimrc file. +" +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last change: 2015 Mar 24 +" +" To use it, copy it to +" for Unix and OS/2: ~/.vimrc +" for Amiga: s:.vimrc +" for MS-DOS and Win32: $VIM\_vimrc +" for OpenVMS: sys$login:.vimrc + +" When started as "evim", evim.vim will already have done these settings. +if v:progname =~? "evim" + finish +endif + +" Use Vim settings, rather than Vi settings (much better!). +" This must be first, because it changes other options as a side effect. +set nocompatible + +" allow backspacing over everything in insert mode +set backspace=indent,eol,start + +if has("vms") + set nobackup " do not keep a backup file, use versions instead +else + set backup " keep a backup file (restore to previous version) + set undofile " keep an undo file (undo changes after closing) +endif + +set history=50 " keep 50 lines of command line history +set ruler " show the cursor position all the time +set showcmd " display incomplete commands +set incsearch " do incremental searching + +" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries +" let &guioptions = substitute(&guioptions, "t", "", "g") + +" Don't use Ex mode, use Q for formatting +map Q gq + +" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, +" so that you can undo CTRL-U after inserting a line break. +inoremap <C-U> <C-G>u<C-U> + +" In many terminal emulators the mouse works just fine, thus enable it. +if has('mouse') + set mouse=a +endif + +" Switch syntax highlighting on, when the terminal has colors +" Also switch on highlighting the last used search pattern. +if &t_Co > 2 || has("gui_running") + syntax on + set hlsearch + colorscheme wombat256mod +endif + +" Only do this part when compiled with support for autocommands. +if has("autocmd") + + " Enable file type detection. + " Use the default filetype settings, so that mail gets 'tw' set to 72, + " 'cindent' is on in C files, etc. + " Also load indent files, to automatically do language-dependent indenting. + filetype plugin indent on + + " Put these in an autocmd group, so that we can delete them easily. + augroup vimrcEx + au! + + " For all text files set 'textwidth' to 78 characters. + autocmd FileType text setlocal textwidth=78 + + " 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). + autocmd BufReadPost * + \ if line("'\"") >= 1 && line("'\"") <= line("$") | + \ exe "normal! g`\"" | + \ endif + + augroup END + +else + + set autoindent " always set autoindenting on + +endif " has("autocmd") + +" Convenient command to see the difference between the current buffer and the +" file it was loaded from, thus the changes you made. +" Only define it when not defined already. +if !exists(":DiffOrig") + command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis + \ | wincmd p | diffthis +endif + +if has('langmap') && exists('+langnoremap') + " Prevent that the langmap option applies to characters that result from a + " mapping. If unset (default), this may break plugins (but it's backward + " compatible). + set langnoremap +endif + +map <F2> :tabnew +map <F3> :tabprevious<CR> +map <F4> :tabnext<CR> + +" Show Line Numbers +set nu +set complete=.,b,u,] +set wildmode=longest,list:longest +set completeopt=menu,preview + +" Directories +set backupdir=~/.vim/backup +set undodir=~/.vim/undodir +set viewdir=~/.vim/views +set directory=~/.vim/swap + +" Spell Check +set spell spelllang=en_us + +" Strips whitespace +nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR> + +" Whitespace fixes +highlight ExtraWhitespace ctermbg=red guibg=red +match ExtraWhitespace /\s\+$/ +autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ +autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/ +autocmd InsertLeave * match ExtraWhitespace /\s\+$/ +autocmd BufWinLeave * call clearmatches() + + +" For tab characters that appear 4-spaces-wide +set tabstop=4 +" If you're using actual tab character in your source code you probably also +" want these settings (these are actually the defaults,set them defensively): +set softtabstop=0 noexpandtab +" Finally, if you want an indent to correspond to a single tab, you should also use: +set shiftwidth=4 +" For indents that consist of 4 space characters but are entered with the tab key: +set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab +set list +" set past gives problems with tabs +" set paste + + |