diff --git a/emacs b/emacs index 537037a..2542e12 100644 --- a/emacs +++ b/emacs @@ -2,6 +2,30 @@ (line-number-mode 1) (column-number-mode 1) +; Fill to 80 columns by default +(setq-default fill-column 80) + +; Spaces, not tabs! +(setq-default indent-tabs-mode 'nil) + ; Use solarized color scheme (add-to-list 'custom-theme-load-path "~/.emacs.d/solarized") (load-theme 'solarized-dark t) + +;; +;; ORG MODE +;; + +; Use org mode from the ~Internet~ +(add-to-list 'load-path (expand-file-name "~/.emacs.d/org-mode/lisp")) +(require 'org) + +; Files ending in .org +(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode)) + +; Auto fill in org mode +(add-hook 'org-mode-hook 'auto-fill-mode) + +(global-set-key "\C-cl" 'org-store-link) +(global-set-key "\C-ca" 'org-agenda) +(global-set-key "\C-cb" 'org-iswitchb) diff --git a/vimrc b/vimrc index 786cc28..69cd69e 100644 --- a/vimrc +++ b/vimrc @@ -129,12 +129,16 @@ if &t_Co > 2 || has('gui_running') syntax on " turn on syntax highlighting endif -set bg=dark +if $ITERM_PROFILE =~# '[Ll]ight' + set bg=light +else + set bg=dark +endif " Try to use the solarized colorscheme if the terminal can support it (or we're in a GUI) try - let g:solarized_termtrans = 1 " transparent terminals - let g:solarized_visibility = 'low' " visibility of list chars + let g:solarized_termtrans = 0 " transparent terminals + "let g:solarized_visibility = 'low' " visibility of list chars colorscheme solarized endtry @@ -242,13 +246,6 @@ nnoremap fa :%s/\v nnoremap f :call SelectaCommand("find * -type f", "", ":e") -" Toggle position highlighting -augroup cursor_position - autocmd! - autocmd InsertEnter * setlocal nocursorline - autocmd InsertLeave * setlocal cursorline -augroup END - nnoremap cl :setlocal invcursorline nnoremap cc :setlocal invcursorcolumn @@ -274,6 +271,9 @@ let g:gitgutter_enabled = 0 highlight clear SignColumn nnoremap gg :ToggleGitGutter +" Don't underline folded lines +highlight Folded cterm=bold + " Autocommands {{{ if has('autocmd') filetype plugin indent on @@ -308,6 +308,13 @@ if has('autocmd') autocmd! autocmd BufRead SCons{truct,cript} setf python augroup END + + " Toggle position highlighting + augroup HighlightCursorLineInNormalMode + autocmd! + autocmd InsertEnter * setlocal nocursorline + autocmd InsertLeave * setlocal cursorline + augroup END endif " }}}