1. Fernando G N Rocha
  2. dotfiles

Commits

Fernando G N Rocha  committed f6eeddf

nvimrc and map caps to esc

  • Participants
  • Parent commits 7d55e3a
  • Branches default

Comments (0)

Files changed (2)

File .nvimrc

View file
+if has('neovim')
+  let s:python_host_init = 'python2 -c "import neovim; neovim.start_host()"'
+  let &initpython = s:python_host_init
+  let &initclipboard = s:python_host_init
+  set unnamedclip " Automatically use clipboard as storage for the unnamed register
+endif
+
+if has('neovim')
+  set unnamedclip " Automatically use clipboard as storage for the unnamed register
+endif
+
+set nocompatible
+
+filetype off
+
+set rtp+=~/.vim/bundle/vundle/
+call vundle#rc()
+
+Bundle 'gmarik/vundle'
+Bundle 'kien/ctrlp.vim'
+Bundle 'altercation/vim-colors-solarized'
+Bundle 'airblade/vim-gitgutter'
+Bundle 'terryma/vim-multiple-cursors'
+Bundle 'natw/keyboard_cat.vim'
+" Bundle 'tudorprodan/pyfinder.vim'
+" Bundle 'FredKSchott/CoVim'
+" Bundle 'nvie/vim-rst-tables'
+Bundle 'tomtom/tcomment_vim'
+
+
+let g:gitgutter_enabled = 0
+let g:gitgutter_highlight_lines = 1
+nnoremap <F4> :GitGutterToggle<CR>
+
+" Very useful toggle
+nnoremap <F3> :set relativenumber!<CR>
+
+syntax on
+set background=dark
+let g:solarized_termtrans=1
+let g:solarized_termcolors=256
+colorscheme solarized
+
+set nocompatible
+set backspace=2
+
+filetype plugin on
+filetype plugin indent on
+
+set spell spelllang=en_us
+
+"Make the completion menus readable
+highlight Pmenu ctermfg=0 ctermbg=3
+highlight PmenuSel ctermfg=0 ctermbg=7
+
+set wildignore=*.pyc
+
+let g:netrw_list_hide='.*\.pyo$,.*\.pyc,.*\.swp$,.*\.swo$'
+
+" for mistyping :w as :W
+command! W :w
+command! Q :q
+
+" Copy indent from current line when starting a new line.
+set smartindent
+set showmode
+set autoindent
+
+" enter spaces when tab is pressed:
+set expandtab
+
+
+" use 4 spaces to represent a tab
+set tabstop=4
+set softtabstop=4
+
+
+" number of space to use for auto indent
+" you can use >> or << keys to indent current line or selection
+" in normal mode.
+set shiftwidth=4
+
+" Fix paste from clipboard
+set pastetoggle=<F2>
+
+" Java autocomplete http://www.vim.org/scripts/script.php?script_id=1785
+"autocmd Filetype java setlocal omnifunc=javacomplete#Complete 
+"setlocal completefunc=javacomplete#CompleteParamsInfo 
+"inoremap <buffer> <C-Space> <C-X><C-U><C-P> 
+
+" Save as root 
+command Ws w !sudo tee % >/dev/null
+
+" Python
+if !exists("autocommands_loaded")
+  let autocommands_loaded = 1
+  autocmd BufRead,BufNewFile,FileReadPost *.py source ~/.vim/python
+endif
+
+" This beauty remembers where you were the last time you edited the file, and returns to the same position.
+au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
+
+" Clojure
+"let vimclojure#WantNailgun = 1
+"let vimclojure#NailgunClient = "ng"
+"java -cp /usr/share/clojure/clojure.jar:/usr/share/clojure/clojure-contrib.jar:/usr/share/vimclojure/vimclojure.jar vimclojure.nailgun.NGServer 127.0.0.1
+
+"set fo+=t
+
+"{{{ from : http://stackoverflow.com/questions/164847/what-is-in-your-vimrc
+" This is totally awesome - remap jj to escape in insert mode.  You'll never
+" type jj anyway, so it's great!
+inoremap jj <Esc>
+
+" Highlight things that we find with the search
+set hlsearch
+" }}}
+
+:set incsearch
+
+set gfn=Terminus\ Bold\ 19
+
+" Disable annoying F1
+noremap <F1> <nop>
+inoremap <F1> <nop>
+
+nnoremap K <nop>
+
+" Hash sign always indented in Python
+autocmd BufRead *.py inoremap # X<c-h>#
+autocmd BufRead *.py set textwidth=78
+
+" Lets fold everything
+set foldmethod=indent
+set clipboard=unnamedplus 

File .xinitrc

View file
 #!/bin/sh
 # start some nice programs
+setxkbmap -option caps:escape
 xsetroot -cursor_name left_ptr &
 pulseaudio --start &
 wallpaper &