Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linuxbin
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
linuxbin
Commits
1259d9c1
Commit
1259d9c1
authored
5 years ago
by
Boman Romain
Browse files
Options
Downloads
Patches
Plain Diff
add vimrc file
parent
9a373572
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vim/.vimrc
+183
-0
183 additions, 0 deletions
vim/.vimrc
with
183 additions
and
0 deletions
vim/.vimrc
0 → 100644
+
183
−
0
View file @
1259d9c1
" .vimrc
" from
" https://github.com/erkrnt/awesome-streamerrc/blob/master/ThePrimeagen/.vimrc
" http://vim.fisadev.com
" ============================================================================
" Vim-plug initialization
" Avoid modifying this section, unless you are very sure of what you are doing
let
vim_plug_just_installed
=
0
let
vim_plug_path
=
expand
(
'~/.vim/autoload/plug.vim'
)
if
!
filereadable
(
vim_plug_path
)
echo
"Installing Vim-plug..."
echo
""
silent
!
mkdir
-
p
~
/.vim/
autoload
silent
!
curl
-
fLo
~
/.vim/
autoload
/plug.vim --create-dirs https://raw.githubusercontent.com/
junegunn
/vim-plug/
master/plug
.
vim
let
vim_plug_just_installed
=
1
endif
" manually load vim-plug the first time
if
vim_plug_just_installed
:
execute
'source '
.
fnameescape
(
vim_plug_path
)
endif
" ============================================================================
" ---- PLUGINS ----------------------------------------------------------------
"
" https://github.com/junegunn/vim-plug
" install plugins with :PlugInstall
" clean unused plugins :PlugClean
"
call
plug#begin
(
'~/.vim/plugged'
)
Plug
'morhetz/gruvbox'
" color scheme
"Plug 'tpope/vim-fugitive' " git integration
"Plug 'lyuts/vim-rtags' " C++
"Plug 'ycm-core/YouCompleteMe'
"Plug 'mbbill/undotree'
" Airline (status bar on the bottom)
Plug
'vim-airline/vim-airline'
Plug
'vim-airline/vim-airline-themes'
call
plug#end
()
" -----------------------------------------------------------------------------
" ============================================================================
" Install plugins the first time vim runs
if
vim_plug_just_installed
echo
"Installing Bundles, please ignore key map error messages"
:
PlugInstall
endif
" ============================================================================
" mouse
set
mouse
-=
a
" disable custom
mouse
in
vim
(
so
that we can select
"if has("mouse")
" set mouse=a " control cursor with the mouse
"endif
syntax
on
"
syntax
highlighting
" hides buffers instead of closing them. This means that you can have unwritten
" changes to a file and open a new file using :e, without being forced to write
" or undo your changes first
"set hidden
"set nocompatible " useless
set
visualbell
set
noerrorbells
" no sounds
set
tabstop
=
4
" size of
tabs
(
set
ts
=
4
also works
)
set
shiftwidth
=
4
"
indent
using
'>'
uses
4
spaces
set
softtabstop
=
4
set
expandtab
"
tabs
=>
spaces
set
smartindent
set
number
"
line
numbers
(
set
nu
)
set
nowrap
" no wrapping of long
lines
set
noswapfile
set
nobackup
" because
undodir
/
undofile
set
undodir
=~
/.vim/
undodir
set
undofile
if
!
isdirectory
(
&
undodir
)
call
mkdir
(
&
undodir
,
"p"
)
endif
set
hlsearch
"
highlight
search
terms
set
incsearch
" incremental
search
set
ignorecase
set
smartcase
" ignore case
if
search
pattern
is
all
lowercase
,
" case-sensitive otherwise
set
cmdheight
=
2
"
more
space
for
displaying msgs
" when scrolling, keep cursor 3 lines away from screen border
set
scrolloff
=
3
" colours/theme
set
background
=
dark
" use 256 colors when possible
if
has
(
'gui_running'
)
||
(
&
term
=~
?
'mlterm\|xterm\|xterm-256\|screen-256'
)
if
!
has
(
'gui_running'
)
let
&
t_Co
=
256
endif
colorscheme
gruvbox
"colorscheme desert "moche
else
colorscheme
delek "tres moche
endif
set
cursorline
"
highlight
the
line
of the
cursor
set
colorcolumn
=
80
"
highlight
column #
80
highlight
CorlorColumn ctermbg
=
0
guibg
=
lightgrey
" highlight text beyond column 80
highlight
OverLength ctermbg
=
71
ctermfg
=
white guibg
=
#592929
match
OverLength
/\%81v.\+/
" the default file browser in vim is netrw (cmd :Explore)
" https://shapeshed.com/vim-netrw/
let
g:netrw_banner
=
0
"
remove
banner
(
key
`I`
)
let
g:netrw_browse_split
=
2
"
open
files
in
a
new
vertical
split
let
g:netrw_winsize
=
25
" sets the width
to
25
% of the page
let
g:netrw_liststyle
=
3
" default
list
style
(
key
`
i
`
)
" defines a `leader key` for custom shortcuts
let
mapleader
=
" "
" REMAPs
" move cursor to other splits
nnoremap
<
leader
>
h
:
wincmd
h
<
CR
>
nnoremap
<
leader
>
j
:
wincmd
j
<
CR
>
nnoremap
<
leader
>
k
:
wincmd
k
<
CR
>
nnoremap
<
leader
>
l
:
wincmd
l
<
CR
>
" open explorer
nnoremap
<
leader
>
pv
:
wincmd
v
<
bar
>
:
Ex
<
bar
>
:
vertical
resize
30
<
CR
>
" resize splits
nnoremap
<
silent
>
<
Leader
>+
:
vertical
resize
+
5
<
CR
>
nnoremap
<
silent
>
<
Leader
>-
:
vertical
resize
-5
<
CR
>
" Remove newbie crutches in Command Mode
"cnoremap <Down> <Nop>
"cnoremap <Left> <Nop>
"cnoremap <Right> <Nop>
"cnoremap <Up> <Nop>
" Remove newbie crutches in Insert Mode
"inoremap <Down> <Nop>
"inoremap <Left> <Nop>
"inoremap <Right> <Nop>
"inoremap <Up> <Nop>
" Remove newbie crutches in Normal Mode
"nnoremap <Down> <Nop>
"nnoremap <Left> <Nop>
"nnoremap <Right> <Nop>
"nnoremap <Up> <Nop>
" Remove newbie crutches in Visual Mode
"vnoremap <Down> <Nop>
"vnoremap <Left> <Nop>
"vnoremap <Right> <Nop>
"vnoremap <Up> <Nop>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment