Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
configs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
configs
Commits
231796b5
Commit
231796b5
authored
Dec 19, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up vimrc, added Vundle and YouCompleteMe
parent
f087929e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
112 additions
and
158 deletions
+112
-158
.gitignore
.gitignore
+2
-0
.gitmodules
.gitmodules
+3
-0
bootstrap.bash
bootstrap.bash
+5
-2
vim/bundle/Vundle.vim
vim/bundle/Vundle.vim
+1
-0
vimrc
vimrc
+86
-156
vimrc_plugins
vimrc_plugins
+15
-0
No files found.
.gitignore
View file @
231796b5
vim/.*
vim/.*
*.swp
vim/bundle/*
.gitmodules
0 → 100644
View file @
231796b5
[submodule "vim/bundle/Vundle.vim"]
path = vim/bundle/Vundle.vim
url = https://github.com/gmarik/Vundle.vim.git
bootstrap.bash
View file @
231796b5
...
@@ -2,7 +2,10 @@
...
@@ -2,7 +2,10 @@
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
ln
-s
$DIR
/bashrc ~/.bashrc
ln
-s
$DIR
/bashrc ~/.bashrc
ln
-s
$DIR
/vimrc ~/.vimrc
ln
-s
$DIR
/vimrc
_plugins
~/.vimrc
ln
-sT
$DIR
/vim ~/.vim
ln
-sT
$DIR
/vim ~/.vim
.
~/.bashrc
source
~/.bashrc
vim
-c
PluginInstall
cd
$DIR
/vim/bundle/YouCompleteMe
&&
./install.sh
--clang-completer
Vundle.vim
@
0b28e334
Subproject commit 0b28e334e65b6628b0a61c412fcb45204a2f2bab
vimrc
View file @
231796b5
set ruler
" -------------
hi SpellBad guisp=#fcaf3e cterm=underline
" General setup
set expandtab
" -------------
set modeline
set tabstop=4 " a tab is four spaces
filetype plugin indent on
set backspace=indent,eol,start
syntax enable
" allow backspacing over everything in insert mode
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
set number " always show line numbers
set shiftwidth=4 " number of spaces to use for autoindenting
set shiftround " use multiple of shiftwidth when indenting with '<' and '>'
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase,
" case-sensitive otherwise
set smarttab " insert tabs on the start of a line according to
" shiftwidth, not tabstop
set hlsearch " highlight search terms
set incsearch " show search matches as you type
set history=1000 " remember more commands and search history
set undolevels=1000 " use many muchos levels of undo
set wildignore=*.swp,*.bak,*.pyc,*.class,*.old
set textwidth=79
" Automatically remove all trailing whitespace
set vb t_vb=
autocmd BufWritePre * :%s/\s\+$//e
set ls=2 " always display filename
" Source completion
" Automatically open and close the popup menu / preview window
"set omnifunc=syntaxcomplete#Complete
"au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
"set completeopt=menuone,menu,longest,preview
"
IMPORTANT: Uncomment one of the following lines to force
"
------
"
using 256 colors (or 88 colors) if your terminal supports it,
"
Layout
"
but does not automatically use 256 colors by default.
"
------
" -- run in gnome-terminal: --
" try 256 color mode if envvar is set
" export TERM="xterm-256color"
"
set t_Co=88
set t_Co=88
if $TERM == 'xterm-256color' | set t_Co=256 | endif
if $TERM == 'xterm-256color'
" Color scheme
set t_Co=256
endif
" ,rl = run pdflatex (on current file)
map ,rl :!pdflatex -src -shell-escape -interaction=nonstopmode %
" trigger pdflatex (above) on FileWritePost event
":autocmd BufWritePost *.tex :!pdflatex -src -shell-escape -interaction=nonstopmode % | grep -A 4 -i "error"
:autocmd BufNewFile,BufRead *.tex :set spell
"augroup vimrc_autocmds
" autocmd BufEnter * highlight OverLength ctermbg=darkgrey guibg=#592929
" autocmd BufEnter * match OverLength /\%81v.*/
"augroup END
" configure tags - add additional tags here or comment out not-used ones
" cd /usr/include
" ctags -R --sort=yes --fields=+iaS -f ~/.vim/tags/stdc stdio.h stdlib.h \
" pthread.h math.h assert.h errno.h malloc.h strings.h fcntl.h unistd.h
" ctags -R --sort=yes --fields=+iaS -f ~/.vim/tags/gl GL/
"set tags+=~/.vim/tags/stdc
"set tags+=~/.vim/tags/gl
" build tags of your own project with CTRL+F12
"map <C-F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
"noremap <F12> :!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<cr>
"inoremap <F12> <Esc>:!ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .<cr>
"" OmniCppComplete
"let OmniCpp_NamespaceSearch = 1
"let OmniCpp_GlobalScopeSearch = 1
"let OmniCpp_ShowAccess = 1
"let OmniCpp_MayCompleteDot = 1
"let OmniCpp_MayCompleteArrow = 1
"let OmniCpp_MayCompleteScope = 1
"let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
"" automatically open and close the popup menu / preview window
"au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
""set completeopt=menuone,menu,longest,preview
"set completeopt=menuone,menu " ,longest,preview
"set nocp
filetype plugin on
"set background=dark
"set background=dark
"colorscheme darkspectrum
"colorscheme darkspectrum
runtime! plugin/guicolorscheme.vim
runtime! plugin/guicolorscheme.vim
GuiColorScheme darkspectrum
GuiColorScheme darkspectrum
" Wildmenu
set fileformats=unix " obviously...
set wildmenu " use wildmenu
set ruler " show cursor location
set wildcharm=<TAB> " autocomplete
set modeline " read modelines
set wildignore=*.swp,*.bak,*.pyc,*.class,*.old
set number " show line numbers
set title " change the terminal's title
" ------------------
set nocompatible " disable Vi-compatibility
" Various vim tweaks
set laststatus=2 " always display filename
" ------------------
set textwidth=79 " break line at 79 chars
set title " change the terminal's title
set visualbell " don't beep
" Tabs are for heathens, we indent with spaces
set noerrorbells " don't beep
set expandtab smarttab
set nocp " Disable Vi-compatibility
set shiftwidth=4 tabstop=8 softtabstop=0
set autoindent copyindent
" syntax detection and filetype indention
set shiftround
filetype plugin indent on
set backspace=indent,eol,start
syntax enable
" pathogen
execute pathogen#infect()
autocmd BufReadPre *.pdf set ro nowrap
autocmd BufReadPost *.pdf silent %!pdftotext "%" -nopgbrk -layout -q -eol unix -
" C syntax highlighting for CiviC files
au BufNewFile,BufRead *.cvc set filetype=c
" Automatically remove all trailing spaces
autocmd BufWritePre * :%s/\s\+$//e
" -----------------
" Don't give people epilepsy
" Source completion
set visualbell t_vb= noerrorbells
" -----------------
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
"set completeopt=menuone,menu
"
--------------
"
Enable wildmenu for browsing files in :e command
" Source folding
set wildmenu
" --------------
set wildcharm=<TAB>
"set foldmethod=indent
set wildignore=*.swp,*.bak,*.pyc,*.class,*.o,*.bc
" -------------
" File explorer
" File explorer
" -------------
let g:netrw_liststyle=3 " Use tree-mode as default view
let g:netrw_preview=1 " Preview window shown in a vertically split
let g:netrw_liststyle=3 " Use tree-mode as default view
" ---------
"
let g:netrw_browse_split=4 " Open file in previous buffer
"
Searching
let g:netrw_preview=1 " Preview window shown in a vertically split
" ---------
" ------------
set history=1000 undolevels=1000
" Key bindings
set wildignore=*.swp,*.bak,*.pyc,*.class,*.old
" ------------
set hlsearch " highlight search terms
set incsearch " show search matches as you type
set smartcase " clever case sensitivity
" -----------------------
" Key bindings / commands
" -----------------------
" skip the press and hold 'shift' + press ';' + release 'shift'.
" Use ';' instead of ':'
" Now you can simply use ';' instead of ':'.
nnoremap ; :
nnoremap ; :
" Use Q for formatting the current paragraph (or selection)
" Use Q for formatting the current paragraph (or selection)
vmap Q gq
vmap Q gq
nmap Q gqap
nmap Q gqap
" Unbind Shift + up/down
" Solve line jumping with long, wrapped lines (use [jk] for normal behaviour)
vmap <s-up> <up>
nnoremap <down> gj
nmap <s-up> <up>
nnoremap <up> gk
vmap <s-down> <down>
nmap <s-down> <down>
" If you like long lines with line wrapping enabled, this solves the problem
" that pressing down jumpes your cursor “over” the current line to the next
" line. It changes behaviour so that it jumps to the next row in the editor.
nnoremap j gj
nnoremap k gk
"
Easy window navigation
"
Window navigation with ctrl + [hjkl]
map <C-h> <C-w>h
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-k> <C-w>k
map <C-l> <C-w>l
map <C-l> <C-w>l
" It clears the search buffer (and highlighting) when you press ,/
" Shortcuts for common commands
nmap <silent> ,/ :nohlsearch<CR>
nmap <silent> ,/ :nohlsearch<CR>
nmap <silent> ,mt :!make check<CR>
nmap <silent> ,mc :!make coverage<CR>
nmap <silent> ,ml :!make clean<CR>
nmap <silent> ,mm :!make<CR>
nmap <silent> ,mm :!make<CR>
nmap <silent> ,mM :!make && make<CR>
nmap <silent> ,ml :!make clean<CR>
nmap <silent> ,md :!make doc<CR>
nmap <silent> ,mt :!make check<CR>
nmap <silent> ,md :!make dist<CR>
nmap <silent> ,mb :!make -B<CR>
nmap <silent> ,mb :!make -B<CR>
nmap <silent> ,a :!ant<CR>
" when you forgot to sudo before editing a file that requires root privileges.
" Use w!! to save a file as root if opened with insufficient permissions
" This lets you use w!! to do that after you opened the file already:
cmap w!! w !sudo tee % >/dev/null
cmap w!! w !sudo tee % >/dev/null
" Status line highlight
" ---------------
:hi StatusLine ctermbg=black ctermfg=grey
" Syntax / indent
" ---------------
" S
yntax highlighting for .less files
" S
ome files only have 2 spaces indent
au
BufNewFile,BufRead *.less set filetype=less
au
tocmd FileType sass,html set shiftwidth=2
set fileformats=unix
" Tabs in Makefiles are 4 spaces since they are required and thus need not be
" religiously burned
autocmd FileType make set tabstop=4
" Make pfd's readable
autocmd BufReadPre *.pdf set ro nowrap
autocmd BufReadPost *.pdf silent %!pdftotext "%" -nopgbrk -layout -q -eol unix -
let mapleader=","
" C syntax highlighting for CiviC files
autocmd BufNewFile,BufRead *.cvc set filetype=c
" Status line highlight
highlight StatusLine ctermbg=black ctermfg=grey
" Syntax highlighting for .less files
autocmd BufNewFile,BufRead *.less set filetype=less
"
Pathoge
n
"
Highlight and underline badly spelled words when spellcheck is o
n
execute pathogen#infect()
highlight SpellBad guisp=#fcaf3e cterm=underline
vimrc_plugins
0 → 100644
View file @
231796b5
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'Valloric/YouCompleteMe'
call vundle#end()
execute pathogen#infect()
source vimrc
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment