Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P40
.vimrc
Archived
Public
Actions
Authored by
pmoreau
on Sep 29 2015, 11:27 PM.
Edit Paste
Activate Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
" Vim Configuration File
" Author: Pierre Moreau <dev@pmoreau.org>
" Disable Vi compatibility
set
nocompatible
" Set beginning of statusline
set
statusline
=
%
<
%
f
\ %
h
%
m
%
r
\ \
" Encoding settings
set
fileencoding
=
utf
-8
set
encoding
=
utf
-8
" Identation settings
filetype
plugin indent
on
set
expandtab
set
shiftwidth
=
2
set
shiftround
set
softtabstop
=
2
" Viewing settings
syntax
on
set
hidden
" Hide buffers when opening a new one, rather than closing them
set
laststatus
=
2
set
modeline
set
modelines
=
2
set
showcmd
set
number
set
showmatch
set
splitright
set
splitbelow
set
list
set
listchars
=
tab
:
>-,
trail:¬
,
nbsp:Ŧ
set
textwidth
=
79
set
pastetoggle
=<
F2
>
autocmd
VimResized
*
wincmd
=
highlight
ColorColumn ctermfg
=
DarkBlue ctermbg
=
LightGrey
highlight
Delimiter ctermfg
=
Black ctermbg
=
DarkGreen
highlight
Comment ctermfg
=
DarkGreen ctermbg
=
Black
autocmd
FileType
help
wincmd
L
" Search settings
set
smartcase
set
incsearch
set
hlsearch
noremap
<
CR
>
:
nohlsearch
<
CR
><
CR
>
" Ctags settings
set
previewheight
=
6
" Completion settings
set
wildmode
=
longest
,
full
set
wildmenu
set
wildignore
=
*.swp
,
*.bak
,
*.pyc
,
*.class
" Tags settings
map
<
A
-
]
>
:
tab
split
<
CR
>
:exec
(
"tag "
.expand
(
"<cword>"
))<
CR
>
map
<
C
-
\
>
:
vsp
<
CR
>
:exec
(
"tag "
.expand
(
"<cword>"
))<
CR
>
" A plugin
let
g
:alternateRelativeFiles
=
1
" YouCompleteMe plugin
let
g
:ycm_show_diagnostics_ui
=
1
let
g
:ycm_confirm_extra_conf
=
0
let
g
:ycm_autoclose_preview_window_after_completion
=
1
let
g
:ycm_autoclose_preview_window_after_insertion
=
1
let
g
:ycm_collect_identifiers_from_tags_files
=
1
let
g
:ycm_seed_identifiers_with_syntax
=
1
let
g
:ycm_add_preview_to_completeopt
=
1
let
g
:ycm_filepath_completion_use_working_dir
=
1
highlight
Pmenu ctermfg
=
DarkCyan ctermbg
=
Black guifg
=
#008ab8
guibg
=
#000000
" Color-Coded plugin
let
g
:color_coded_enabled
=
1
if
&
diff
let
g
:color_coded_enabled
=
0
endif
" GLSL.vim settings
let
g
:glsl_file_extensions
=
'*.vert,*.geo,*.tcs,*.tes,*.comp,*.frag'
" Vim-Fugitive settings
autocmd
BufReadPost
fugitive:
//
*
set
bufhidden
=
delete
set
statusline
+=
%{fugitive#
statusline
()
}
" Set end of statusline
set
statusline
+=
%
=
%
-14
.
(
%
l
,
%
c
%V%
)
\ %P
let
s:plug_dir
=
'~/.vim/plugged'
function
!
BuildColorCoded
(
info
)
if
a
:info.status
==
'installed'
execute
'!mkdir build'
execute
'!cd build && cmake -GNinja ..'
endif
if
a
:info.force
execute
'!cd build && ninja clean'
endif
execute
'!cd build && ninja install'
endfunction
function
!
BuildYouCompleteMe
(
info
)
if
a
:info.status
==
'installed'
execute
'!mkdir build'
execute
'!cd build && cmake -GNinja -DUSE_SYSTEM_LIBCLANG=ON . ../third_party/ycmd/cpp'
endif
if
a
:info.force
execute
'!cd build && ninja clean'
endif
execute
'!cd build && ninja ycm_support_libs'
endfunction
call
plug#begin
(
s:plug_dir
)
Plug
'beyondmarc/glsl.vim'
Plug
'jeaye/color_coded'
,
{
'do'
:
function
(
'BuildColorCoded'
)
}
Plug
'Valloric/YouCompleteMe'
,
{
'do'
:
function
(
'BuildYouCompleteMe'
)
}
Plug
'tpope/vim-fugitive'
Plug
'tbknl/vimproject'
Plug
'fidian/hexmode'
call
plug#
end
()
Event Timeline
pmoreau
edited the content of this paste.
(Show Details)
Sep 29 2015, 11:27 PM
2015-09-29 23:27:11 (UTC+2)
pmoreau
changed the title of this paste from untitled to
.vimrc
.
pmoreau
updated the paste's language from
autodetect
to
autodetect
.
pmoreau
changed the visibility from "All Users" to "Public (No Login Required)".
pmoreau
edited the content of this paste.
(Show Details)
Sep 30 2015, 11:37 AM
2015-09-30 11:37:43 (UTC+2)
pmoreau
edited the content of this paste.
(Show Details)
Feb 24 2016, 1:38 PM
2016-02-24 13:38:33 (UTC+1)
pmoreau
archived this paste.
Aug 23 2020, 10:26 AM
2020-08-23 10:26:42 (UTC+2)
Log In to Comment