# General environment settings
export PAGER="less"
-export EDITOR="vim"
export CVS_RSH="ssh"
export RSYNC_RSH="ssh"
export PYTHONSTARTUP="${HOME}/.pythonrc.py"
export EMAIL="James Bunton <jamesbunton@delx.net.au>"
+# Editor settings
+if emacsclient --version &> /dev/null; then
+ export ALTERNATE_EDITOR="vim"
+ export EDITOR="emacsclient --create-frame"
+else
+ export EDITOR="vim"
+fi
+
# Expand any symbolic links in the TMPDIR environment variable
[ -n "$TMPDIR" ] && export TMPDIR="$(cd "${TMPDIR}" && pwd -P)"
.bash/environment_local
.bash/functions_local
.bash/interactive_local
-.vim/abbrsout.vim
+.emacs.d/auto-save-list
+.emacs.d/elpa
+.emacs.d/save-place-file
.vim/.netrwhist
.vim/viminfo
.*.swp
set completion-map-case on
set show-all-if-ambiguous on
set colored-stats on
-
-set editing-mode vi
-
-set keymap vi-insert
-"\C-l": clear-screen
-"\e[2~": quoted-insert
-"\e[3~": vi-delete
-"\e[1~": beginning-of-line
-"\e[4~": end-of-line
-"\e[5~": beginning-of-history
-"\e[6~": end-of-history
-
-set keymap vi-command
-"\C-l": clear-screen
-"\e[2~": quoted-insert
-"\e[3~": vi-delete
-"\e[1~": beginning-of-line
-"\e[4~": end-of-line
-"\e[5~": beginning-of-history
-"\e[6~": end-of-history
-"\7f": backward-char
-"gg": beginning-of-history
-"G": end-of-history
-"{": complete-into-braces
-"*": insert-completions
-
+++ /dev/null
-<C-R>=strftime("%Y-%m-%d")<CR>
+++ /dev/null
-/* Copyright YEAR EMAIL
- * Licensed for distribution under the GPL version 2.
- *
- * ___Program purpose...
- */
-
+++ /dev/null
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <inttypes.h>
-#include <stdbool.h>
-
-
-int
-main(void)
-{
- ___
- return 0;
-}
-
+++ /dev/null
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <inttypes.h>
-#include <stdbool.h>
-
-
-int
-main(int argc, char** argv)
-{
- ___
- return 0;
-}
-
+++ /dev/null
-#include <iostream>
-#include <cmath>
-#include <string>
-#include <vector>
-#include <inttypes.h>
-
-
-int
-main(void)
-{
- ___
- return 0;
-}
-
+++ /dev/null
-#include <iostream>
-#include <cmath>
-#include <string>
-#include <vector>
-#include <inttypes.h>
-
-
-int
-main(int argc, char** argv)
-{
- ___
- return 0;
-}
-
+++ /dev/null
-public class ___ClassName {
- public static void main(String[] args) {
- // code
- }
-}
-
+++ /dev/null
-\documentclass[a4paper,12pt]{report}
-
-% This file must be saved in the UTF8 encoding
-\usepackage[utf8]{inputenc}
-
-% These packages need to be included to insert pictures into your report
-\usepackage[pdftex]{graphicx}
-
-% Better maths suport
-\usepackage{amssymb,amsmath}
-
-% Support links in the pdf file
-\usepackage[pdfborder={0,0,0}]{hyperref}
-
-% Allow \url{}
-\usepackage{url}
-
-% Allow fancier citations, \citet \citep \citeauthor, etc
-% See details here: http://merkel.zoneo.net/Latex/natbib.php
-\usepackage[square,comma,sort,authoryear]{natbib}
-
-% Put a medium sized gap between paragraphs
-\setlength{\parskip}{\medskipamount}
-
-% Don't indent the start of new paragraphs
-\setlength{\parindent}{0pt}
-
-% Changes section numbering somehow...
-\renewcommand{\thesection}{\arabic{section}}
-
-% Bibliography style. Aside from plain, there is also apalike.
-% Look for *.bst files
-\bibliographystyle{plainnat}
-
-
-\title{___The Title goes here}
-\author{
- ___First Author\\
- (email: \tt{___user@example.com}) \\
-}
-
-\begin{document}
-\maketitle
-
-\begin{abstract}
-___Abstract goes here
-\end{abstract}
-
-\tableofcontents
-\newpage
-\listoffigures
-\newpage
-
-\section{___First Section}
-
-
-
-\bibliography{___something}
-
-\end{document}
-
+++ /dev/null
-#!/usr/bin/env python
-# Copyright YEAR EMAIL
-# Licensed for distribution under the GPL version 2, check COPYING for details
-# ___Program purpose
+++ /dev/null
-import math
-import os
-import sys
-
-def main():
- ___ pass
-
-if __name__ == "__main__":
- main()
-
-
+++ /dev/null
-import math
-import os
-import sys
-
-def main(___arg):
- ___ pass
-
-if __name__ == "__main__":
- try:
- ___arg = sys.argv[1]
- except:
- print >>sys.stderr, "Usage: %s ___arg" % sys.argv[0]
- sys.exit(1)
-
- main(___arg)
-
-
+++ /dev/null
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title>___</title>
- <link rel="stylesheet" type="text/css" href="___" />
- <script type="text/javascript" src="___"/>
-</head>
-
-<body>
-___
-</body>
-
-</html>
-
+++ /dev/null
-#!/usr/bin/env python
-
-import time, os, os.path, sys
-
-# To override the defaults, set these variables
-EMAIL = ""
-
-macros = {}
-macros["YDATE"] = lambda: time.strftime("%Y-%m-%d")
-macros["YEAR"] = lambda: time.strftime("%Y")
-macros["EMAIL"] = lambda: EMAIL or os.environ.get("EMAIL", "~/.vim/abbrs2vim.py")
-
-
-vimdir = os.path.join(os.environ.get("HOME"), ".vim")
-try:
- outfilename = os.path.join(vimdir, "abbrsout.vim")
- outfile = open(outfilename, "w")
-except IOError:
- print >> sys.stderr, "Couldn't open output file for writing: %s" % outfilename
- sys.exit(1)
-
-abbrsdir = os.path.join(vimdir, "abbrs")
-if not os.path.isdir(abbrsdir):
- print >> sys.stderr, "Could not find directory with abbreviations: %s" % abbrsdir
- sys.exit(1)
-
-for abbrfile in os.listdir(abbrsdir):
- abbr = open(os.path.join(abbrsdir, abbrfile), "r").read()
- for macro in macros.keys():
- if abbr.find(macro) >= 0:
- abbr = abbr.replace(macro, macros[macro]())
- abbr = abbr.replace("\n", "\r")
- # Put into paste mode and take out of paste mode
- abbr = "iab %s \x1b:set paste\ri%s\x1b:set nopaste\r" % (abbrfile.rsplit('.', 1)[0], abbr)
- if abbr.find("___") >= 0:
- # Then search for ___ to place the cursor there
- abbr += "gg\r/___\x1b:nohlsearch\n"
- else:
- # Leave the cursor in insert mode
- abbr += "a\n"
- outfile.write(abbr)
-
-
map <F11> :call PasteToggle()<CR>
imap <F11> <C-o>:call PasteToggle()<CR>
-" Python Calculator
-command -nargs=+ Calc :r! python -c "from math import *; print <args>"
-
" Unhighlight search results and redraw the screen
nmap <C-l> :nohlsearch<CR>:redraw!<CR>
source ~/.vim/macros.vim
source ~/.vim/commenter.vim
source ~/.vim/filetypes.vim
-if !filereadable(expand("~/.vim/abbrsout.vim"))
- !python ~/.vim/abbrs2vim.py
-endif
-source ~/.vim/abbrsout.vim
if filereadable(expand("~/.vim/local.vim"))
source ~/.vim/local.vim
endif