Created
April 15, 2016 14:09
-
-
Save manuelmazzuola/16b30bfdb0da1a6fdec1612522acc8f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
nixpkgs.config = { | |
allowUnfree = true; | |
firefox = { | |
enableGoogleTalkPlugin = true; | |
enableAdobeFlash = false; | |
enableGnomeExtensions = true; | |
}; | |
chromium = { | |
enablePepperFlash = false; | |
enablePepperPDF = true; | |
}; | |
packageOverrides = pkgs: rec { | |
#idea.idea-ultimate = pkgs.idea.idea-ultimate.override rec { | |
# src = pkgs.fetchurl { | |
# url = "https://download.jetbrains.com/idea/ideaIU-15.0.4.tar.gz"; | |
# sha256 = "c4365098055f492483204742626b77d6005f559bba2bb46ec161aa9ce7f12610"; | |
# }; | |
#}; | |
my_vim = pkgs.vim_configurable.customize { | |
name = "vim"; | |
vimrcConfig.customRC = '' | |
syntax on | |
filetype on | |
set expandtab | |
set bs=2 | |
set tabstop=2 | |
set shiftwidth=2 | |
set autoindent | |
set smartindent | |
set smartcase | |
set ignorecase | |
set modeline | |
set nocompatible | |
set encoding=utf-8 | |
set hlsearch | |
set history=700 | |
set t_Co=256 | |
set tabpagemax=1000 | |
set ruler | |
set nojoinspaces | |
set shiftround | |
" linebreak on 500 characters | |
set lbr | |
set tw=500 | |
" Visual mode pressing * or # searches for the current selection | |
" Super useful! From an idea by Michael Naumann | |
vnoremap <silent> * :call VisualSelection('f')<CR> | |
vnoremap <silent> # :call VisualSelection('b')<CR> | |
let mapleader = "," | |
" Disable highlight when <leader><cr> is pressed | |
map <silent> <leader><cr> :noh<cr> | |
" Smart way to move between windows | |
map <C-j> <C-W>j | |
map <C-k> <C-W>k | |
map <C-h> <C-W>h | |
map <C-l> <C-W>l | |
" I accidentally hit F1 all the time | |
imap <F1> <Esc> | |
" nice try, Ex mode | |
map Q <Nop> | |
" who uses semicolon anyway? | |
map ; : | |
" ==== custom macros ==== | |
" Delete a function call. example: floor(int(var)) | |
" press when your cursor is ^ results in: | |
" floor(var) | |
map <C-H> ebdw%x<C-O>x | |
" Insert a timestamp | |
nmap <F3> a<C-R>=strftime("%Y-%m-%d %a %I:%M %p")<CR><Esc> | |
imap <F3> <C-R>=strftime("%Y-%m-%d %a %I:%M %p")<CR> | |
" Toggle paste mode on and off | |
map <leader>v :setlocal paste!<cr> | |
" run ctags in current directory | |
filetype plugin on | |
map <C-F12> :!ctags -R -I --c++-kinds=+p --fields=+iaS --extra=+q .<CR> | |
" Tagbar shortcut | |
nmap <F8> :TagbarToggle<CR> | |
" CtrlP File finder | |
nmap <Leader>t :CtrlP<CR> | |
let g:syntastic_cpp_compiler = 'clang++' | |
let g:syntastic_cpp_compiler_options = ' -std=c++11' | |
let g:syntastic_c_include_dirs = [ 'src', 'build' ] | |
let g:syntastic_cpp_include_dirs = [ 'src', 'build' ] | |
let g:ycm_autoclose_preview_window_after_completion = 1 | |
''; | |
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins; | |
vimrcConfig.vam.pluginDictionaries = [ | |
{ names = [ | |
"Syntastic" | |
"Tagbar" | |
"ctrlp" | |
"vim-addon-nix" | |
]; } | |
]; | |
}; | |
}; | |
}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment