This commit is contained in:
Kevin Cotugno 2017-02-22 20:49:21 -08:00
commit d4ca9abf84
4 changed files with 204 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*~

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# dotfile
Just my personal configuration files

97
config/emacs.d/init.el Normal file
View File

@ -0,0 +1,97 @@
;; init.el
;;
;; Emacs Configuration
;;
;; Author: Kevin Cotugno git@kevincotugno.com
;; Date: 2/22/17
;; Package
(require 'package)
(package-initialize)
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/"))
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-when-compile
(require 'use-package))
(setq use-package-always-ensure t)
;; Display
(set-default-font "Source Code Pro-12")
(line-number-mode t)
(global-linum-mode t)
(when 'display-graphic-p
(global-hl-line-mode))
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(when 'display-graphic-p (lambda ()
(global-hl-line-mode t)))
;; End display
;; Auto generated config
(setq custom-file (expand-file-name "auto.el" user-emacs-directory))
(load custom-file 'noerror)
;; End auto generated config
;; Text Formatting
(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)
(setq-default c-default-style "linux"
c-basic-offset 8
tab-width 8)
;; End text Formatting
;; Plugins
;; Themes
(use-package dash)
(-each
(-map
(lambda (item)
(format "~/.emacs.d/themes/%s" item))
(-remove
(lambda (item) (or (string= item ".") (string= item "..")))
(directory-files ".emacs.d/themes/")))
(lambda (item)
(add-to-list 'custom-theme-load-path item)))
(load-theme 'solarized t)
(set-frame-parameter nil 'background-mode 'dark)
(enable-theme 'solarized)
;; End themes
(use-package evil
:config
(evil-mode t)
(global-set-key (kbd "C-c C-c") 'evil-force-normal-state))
(use-package evil-leader
:config
(global-evil-leader-mode)
(evil-leader/set-leader "\\"))
(use-package evil-org)
(use-package powerline
:config
(powerline-default-theme))
(use-package org-bullets
:config
(add-hook 'org-mode-hook (lambda ()
(org-bullets-mode t))))
(use-package magit)
;; End Plugins

103
config/nvim/init.vim Normal file
View File

@ -0,0 +1,103 @@
" vim-plug---START
call plug#begin('~/.config/nvim/plugged')
" Plugins
Plug 'airblade/vim-gitgutter'
Plug 'kien/ctrlp.vim'
Plug 'majutsushi/tagbar'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'scrooloose/syntastic'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-surround'
Plug 'vim-syntastic/syntastic'
Plug 'altercation/vim-colors-solarized'
call plug#end()
" vim-plug---END
set number
syntax enable
set background=dark
colorscheme solarized
set nowrap
filetype plugin indent on
set list
set listchars=tab:»»,trail:~
set tabstop=2
set shiftwidth=2
set expandtab
autocmd BufRead,BufNewFile *.h,*.c,*.cpp, set tabstop=8 shiftwidth=8 expandtab
autocmd BufRead,BufNewFile *.cs,*.java set tabstop=4 shiftwidth=4 expandtab
function TrimTrailingInvisibles()
let view = winsaveview()
%s/\s\+$//e
call winrestview(view)
endfunction
function TrimTrailingLines()
let view = winsaveview()
%s/\n\+\%$//e
call winrestview(view)
endfunction
augroup maximus
autocmd BufWrite * call TrimTrailingInvisibles() | call TrimTrailingLines()
autocmd BufLeave * if &buftype == '' && !&readonly && &modifiable && &modified && expand("%:t") != "" | call TrimTrailingInvisibles() | call TrimTrailingLines() | w | SyntasticCheck | GitGutter | endif
augroup END
set statusline=%f
set statusline+=\ %y
set statusline+=[%{&ff}]
set statusline+=%r
set statusline+=%h
set statusline+=%{ModifiedSym()}
set statusline+=%=
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%=
set statusline+=%{AddGitGutterToStatusline()}
set statusline+=\ [%c:%l/%L:%p%%]
function ModifiedSym()
if &modified
return "[\u270f]"
else
return ""
end
endfunction
function AddGitGutterToStatusline()
if &buftype == '' && exists("b:gitgutter_summary")
return join(["[Git:", join(b:gitgutter_summary, ","), "]"], "")
else
return ""
endif
endfunction
" Shortcuts
nmap <C-\> :NERDTreeToggle<CR>
nmap <leader>. :TagbarToggle<CR>
" Plugin configuration
" deoplete
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_ignore_case = 1
" Syntastic
let g:syntastic_stl_format = "[Err: first:%fe total:%e] [Warn: first:%fw total:%w]"
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 1
let g:syntastic_enable_signs = 1
let g:syntastic_aggregate_errors = 1
let g:syntastic_ruby_checkers = ['rubocop', 'mri']
let g:syntastic_error_symbol = "\u2717"
let g:syntastic_warning_symbol = "\uFE0E"