This commit is contained in:
Jeff Lance 2020-05-07 19:44:35 +02:00
parent cb69579cf0
commit 69ab5072f1
4 changed files with 498 additions and 173 deletions

View File

@ -1,3 +1,9 @@
" File : functions.vim
" Author : Jeff LANCE <email@jefflance.me>
" Date : 15.04.2015
" Last Modified Date: 28.04.2020
" Last Modified By : Jeff LANCE <email@jefflance.me>
""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""
" _____ _ _ _ _ ____ _____ ___ ___ _ _ ____ " _____ _ _ _ _ ____ _____ ___ ___ _ _ ____
" | ___| | | | \ | |/ ___|_ _|_ _/ _ \| \ | / ___| " | ___| | | | \ | |/ ___|_ _|_ _/ _ \| \ | / ___|
@ -17,7 +23,6 @@ function! RenameFile()
redraw! redraw!
endif endif
endfunction endfunction
map <leader>n :call RenameFile()<cr>
" Window movement shortcuts " Window movement shortcuts
@ -34,3 +39,40 @@ function! WinMove(key)
exec "wincmd ".a:key exec "wincmd ".a:key
endif endif
endfunction endfunction
" Count buffers
function! CountBuf()
let bufcount = 0
for buf in getbufinfo()
let bufcount += 1
endfor
return bufcount
endfunction
" Test if current buffer is netrw buffer
function! IsNetrw()
if (getbufvar('%', '&filetype') == "netrw" || bufname('%') =~ 'NetrwTreeListing')
return 1
endif
return 0
endfunction
" Test if current buffer is empty
function! IsEmptyBuf()
if (bufname('%') == '')
return 1
endif
return 0
endfunction
" Close current buffer
" If empty return to Startify
function! BufClose()
if (IsEmptyBuf() || IsNetrw())
Startify
else
bwipeout
endif
endfunction

View File

@ -1,3 +1,9 @@
" File : keybindings.vim
" Author : Jeff LANCE <email@jefflance.me>
" Date : 15.04.2015
" Last Modified Date: 28.04.2020
" Last Modified By : Jeff LANCE <email@jefflance.me>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" _ _________ ______ ___ _ _ ____ ___ _ _ ____ ____ " _ _________ ______ ___ _ _ ____ ___ _ _ ____ ____
" | |/ / ____\ \ / / __ )_ _| \ | | _ \_ _| \ | |/ ___/ ___| " | |/ / ____\ \ / / __ )_ _| \ | | _ \_ _| \ | |/ ___/ ___|
@ -10,56 +16,179 @@
" "
" Custom " Custom
" "
"
" Disable highlights when you press <leader><cr>: " Disable highlights when you press <leader><cr>:
map <silent> <leader><cr> :noh<cr> map <silent> <leader><cr> :noh<cr>
" " Enable folding with the spacebar
" Tabs nnoremap <space> za
"
set hidden
nnoremap <silent> <C-w> :tabclose<cr>
nnoremap <silent> <C-t> :tabe<cr>
nnoremap <C-n> :tabnext<cr>
nnoremap <C-p> :tabprevious<cr>
" Source current file
map <leader>s :echom 'Source file' <bar> :so %<cr>
" Two semicolons to escape
" imap ;; <Esc>
" "
" Functions " Buffers
" "
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(
\ <q-args>,
\ fzf#vim#with_preview(
\ {'options': ['--layout=reverse', '--info=inline']}
\ ),
\ <bang>0
\ )
map <C-w> :echom 'Close buffer' <bar> :call BufClose()<cr>
map <C-S-w> :echom 'Force close buffer' <bar> bwipeout!<cr>
map <C-o> :e
map <C-n> :enew<cr>
map <Tab> :bn<cr>
map <S-Tab> :bp<cr>
" Renaming "
map <leader>rn :call RenameFile()<cr> " Windows
"
" Windows move
map <C-h> :call WinMove('h')<cr> map <C-h> :call WinMove('h')<cr>
map <C-j> :call WinMove('j')<cr> map <C-j> :call WinMove('j')<cr>
map <C-k> :call WinMove('k')<cr> map <C-k> :call WinMove('k')<cr>
map <C-l> :call WinMove('l')<cr> map <C-l> :call WinMove('l')<cr>
" "
" NERDTree " Tabs
" "
" Trigger configuration map <leader>tn :tabnew<cr>
map <f2> :NERDTreeToggle<CR> map <leader>tc :tabclose<cr>
map <leader>nb :NERDTreeFromBookmark map <C-Tab> :tabnext<cr>
map <leader>nf :NERDTreeFind<cr> map <leader><Tab> :tabnext<cr>
"
" Defx
"
map <silent> <f3> :Defx<cr>
function! s:defx_toggle_tree() abort
" Open current file, or toggle directory expand/collapse
if defx#is_directory()
return defx#do_action('open_or_close_tree')
endif
return defx#do_action('drop')
endfunction
autocmd FileType defx call s:defx_my_settings()
function! s:defx_my_settings() abort
" Define mappings
" nnoremap <silent><buffer><expr> <CR> defx#do_action('drop')
nnoremap <silent><buffer><expr> <cr>
\ defx#is_directory() ?
\ defx#do_action('open_directory') :
\ defx#do_action('multi', ['drop', 'quit'])
nnoremap <silent><buffer><expr> c
\ defx#do_action('copy')
nnoremap <silent><buffer><expr> m
\ defx#do_action('move')
nnoremap <silent><buffer><expr> p
\ defx#do_action('paste')
nnoremap <silent><buffer><expr> l
\ defx#do_action('open')
nnoremap <silent><buffer><expr> E
\ defx#do_action('open', 'vsplit')
nnoremap <silent><buffer><expr> P
\ defx#do_action('open', 'pedit')
nnoremap <silent><buffer><expr> o
\ defx#do_action('open_or_close_tree')
nnoremap <silent><buffer><expr> K
\ defx#do_action('new_directory')
nnoremap <silent><buffer><expr> N
\ defx#do_action('new_file')
nnoremap <silent><buffer><expr> M
\ defx#do_action('new_multiple_files')
nnoremap <silent><buffer><expr> C
\ defx#do_action('toggle_columns',
\ 'mark:indent:icon:filename:type:size:time')
nnoremap <silent><buffer><expr> S
\ defx#do_action('toggle_sort', 'time')
nnoremap <silent><buffer><expr> d
\ defx#do_action('remove')
nnoremap <silent><buffer><expr> r
\ defx#do_action('rename')
nnoremap <silent><buffer><expr> !
\ defx#do_action('execute_command')
nnoremap <silent><buffer><expr> x
\ defx#do_action('execute_system')
nnoremap <silent><buffer><expr> yy
\ defx#do_action('yank_path')
nnoremap <silent><buffer><expr> .
\ defx#do_action('toggle_ignored_files')
nnoremap <silent><buffer><expr> ;
\ defx#do_action('repeat')
nnoremap <silent><buffer><expr> h
\ defx#do_action('cd', ['..'])
nnoremap <silent><buffer><expr> ~
\ defx#do_action('cd')
nnoremap <silent><buffer><expr> q
\ defx#do_action('quit')
nnoremap <silent><buffer><expr> <Space>
\ defx#do_action('toggle_select') . 'j'
nnoremap <silent><buffer><expr> *
\ defx#do_action('toggle_select_all')
nnoremap <silent><buffer><expr> j
\ line('.') == line('$') ? 'gg' : 'j'
nnoremap <silent><buffer><expr> k
\ line('.') == 1 ? 'G' : 'k'
nnoremap <silent><buffer><expr> <C-l>
\ defx#do_action('redraw')
nnoremap <silent><buffer><expr> <C-g>
\ defx#do_action('print')
nnoremap <silent><buffer><expr> cd
\ defx#do_action('change_vim_cwd')
endfunction
" "
" CtrlP " FZF
" "
map <silent> <C-f> :CtrlPMixed<cr> map <C-f> :Files<cr>
"
" Header
"
map <f4> :AddHeader<cr>
"
" REPL
"
nnoremap <leader>rp :REPLToggle<Cr>
autocmd Filetype python nnoremap <F12> <Esc>:REPLDebugStopAtCurrentLine<Cr>
autocmd Filetype python nnoremap <F10> <Esc>:REPLPDBN<Cr>
autocmd Filetype python nnoremap <F11> <Esc>:REPLPDBS<Cr>
" "
" Vimroom " Vimroom
" "
nnoremap <silent> <leader>z :Goyo<cr> nnoremap <silent> <leader>z :Goyo<cr>
" "
" Vimux " Vimux
" "
map <Leader>vp :VimuxPromptCommand<CR> map <Leader>vp :VimuxPromptCommand<cr>
map <Leader>vl :VimuxRunLastCommand<CR> " map <Leader>vr :VimuxRunCommand<cr>
map <Leader>vz :VimuxZoomRunner<CR> " map <Leader>vo :VimuxOpenRunner<cr>
"
" Functions
"
" Renaming
map <leader>r :call RenameFile()<cr>
" Open file under cursor
map <leader>o :call GotoFile("")<cr>
map <leader>' ciw''<esc>P

View File

@ -1,3 +1,9 @@
" File : plug.vim
" Author : Jeff LANCE <email@jefflance.me>
" Date : 15.04.2015
" Last Modified Date: 28.04.2020
" Last Modified By : Jeff LANCE <email@jefflance.me>
"""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""
" __ _____ __ __ ____ _ _ _ ____ " __ _____ __ __ ____ _ _ _ ____
" \ \ / /_ _| \/ | | _ \| | | | | |/ ___| " \ \ / /_ _| \/ | | _ \| | | | | |/ ___|
@ -11,7 +17,7 @@
if empty(glob('~/.vim/autoload/plug.vim')) if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC autocmd VimEnter * PlugInstall --sync | source ${MYVIMRC}
endif endif
" Specify a directory for plugins " Specify a directory for plugins
@ -19,46 +25,71 @@ endif
" - Avoid using standard Vim directory names like 'plugin' " - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
" Startup sceen
Plug 'mhinz/vim-startify', { 'branch': 'center' } " Startscreen Plug 'mhinz/vim-startify'
Plug 'scrooloose/nerdtree' " File explorer " Deoplete
if using_neovim
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'kristijanhusak/defx-icons'
else
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
Plug 'Shougo/defx.nvim'
Plug 'kristijanhusak/defx-icons'
endif
" Buffer exploration
Plug 'ap/vim-buftabline', { 'as': 'buftabline' }
" Folding
Plug 'Konfekt/FastFold'
" Markdown
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
" Git integration
Plug 'tpope/vim-fugitive'
" Quoting, etc...
Plug 'tpope/vim-surround'
" Commenting shortcuts
Plug 'tpope/vim-commentary'
" Show hex codes as colors
Plug 'chrisbra/Colorizer'
" Put an header in file
Plug 'alpertuna/vim-header'
" Latex support
Plug 'lervag/vimtex'
" Open file
Plug 'amix/open_file_under_cursor.vim'
" Python autocompletion
Plug 'deoplete-plugins/deoplete-jedi'
" Completion from other opened files
Plug 'Shougo/context_filetype.vim'
" Linting
Plug 'dense-analysis/ale'
" REPL for vim
Plug 'sillybun/vim-repl'
" Auto-close char feature
Plug 'Townk/vim-autoclose'
" Indexed search
Plug 'vim-scripts/IndexedSearch'
" Git/mercurial/others diff icons on the side of the file lines
Plug 'mhinz/vim-signify'
" Fuzzy finder
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } " Markdown
Plug 'tpope/vim-fugitive' " Git
Plug 'tpope/vim-surround' " Quotes, etc...
Plug 'ryanoasis/vim-devicons' " Icons
Plug 'tpope/vim-commentary' " Commenting
Plug 'amix/open_file_under_cursor.vim' " open file
Plug 'ctrlpvim/ctrlp.vim' " Fzf, buffer
Plug 'dense-analysis/ale' " Linting
Plug 'ap/vim-css-color' " Color display
Plug 'vim-latex/vim-latex' " LaTeX support
" Distraction-free writing " Distraction-free writing
Plug 'junegunn/goyo.vim' Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim' Plug 'junegunn/limelight.vim'
" Status line
" Tabline
Plug 'itchyny/lightline.vim' Plug 'itchyny/lightline.vim'
Plug 'ap/vim-buftabline', { 'as': 'buftabline' }
" Tmux " Tmux
Plug 'edkolev/tmuxline.vim' Plug 'edkolev/tmuxline.vim'
Plug 'benmills/vimux' Plug 'benmills/vimux'
" Colorschemes " Colorschemes
Plug 'kyoz/purify', { 'as': 'purify', 'rtp': 'vim' } Plug 'nanotech/jellybeans.vim', { 'as': 'jellybeans' }
Plug 'flazz/vim-colorschemes' Plug 'jdsimcoe/abstract.vim', { 'as': 'abstract' }
Plug 'jcherven/jummidark.vim'
Plug 'arzg/vim-colors-xcode'
Plug 'nanotech/jellybeans.vim'
Plug 'jdsimcoe/abstract.vim'
Plug 'rainglow/vim'
Plug 'xero/sourcerer.vim', { 'as': 'sourcerer' } Plug 'xero/sourcerer.vim', { 'as': 'sourcerer' }
Plug 'romainl/apprentice', { 'as': 'apprentice' } " Customization
Plug 'dracula/vim', { 'as': 'dracula' } Plug 'ryanoasis/vim-devicons'
Plug 'sainnhe/edge', { 'as': 'edge' }
Plug 'kyoto-shift/film-noir', { 'as': 'film-noir' }
" required ! " required !

259
vim/vimrc
View File

@ -1,3 +1,9 @@
" File : vimrc
" Author : Jeff LANCE <email@jefflance.me>
" Date : 15.04.2015
" Last Modified Date: 28.04.2020
" Last Modified By : Jeff LANCE <email@jefflance.me>
"""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""
" "
" ____ _____ _ _ _____ ____ _ _ " ____ _____ _ _ _____ ____ _ _
@ -9,10 +15,20 @@
" "
"""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""
" some useful vars
let using_neovim = has('nvim')
let using_vim = !using_neovim
set nocompatible " be iMproved, required set nocompatible " be iMproved, required
filetype off " required filetype plugin indent on
" viminfo configuration " viminfo configuration
if using_vim
set viminfo='100,n$HOME/.vim/files/info/viminfo set viminfo='100,n$HOME/.vim/files/info/viminfo
endif
set backupdir=$HOME/.vim/backup
set directory=$HOME/.vim/tmp
set noswapfile
" UTF-8 " UTF-8
set encoding=utf8 set encoding=utf8
@ -21,23 +37,34 @@ set encoding=utf8
syntax on syntax on
set synmaxcol=512 set synmaxcol=512
"" Set to auto read when a file is changed from the outside " Set to auto read when a file is changed from the outside
set autoread set autoread
"au FocusGained,BufEnter * checktime
" With a map leader it's possible to do extra key combinations " With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file " like <leader>w saves the current file
let mapleader = "," let mapleader = ";"
" Fast saving " Fast saving
nmap <leader>w :w!<cr> nmap <leader>w :w!<cr>
" Allow saving of files as sudo when I forgot to start vim using sudo. " Allow saving of files as sudo when I forgot to start vim using sudo.
command! W execute 'w !sudo tee % > /dev/null %' " ca w!! w !sudo tee "%"
" A buffer becomes hidden when it is abandoned " A buffer becomes hidden when it is abandoned
set hidden set hidden
" Use system clipboard
set clipboard=unnamedplus
" Mouse
set mouse=a
" Auto change dir to current buffer dir
autocmd BufEnter * silent! lcd %:p:h
" Delete extra blank line at the end of file
" autocmd BufWritePre *.py normal m`:%s/\s\+$//e``
"""""""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""""""""
@ -49,9 +76,15 @@ set hidden
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""""""""
" To use fancy symbols wherever possible,
let fancy_symbols_enabled = 1
" Font config " Font config
set guifont=Inconsolata\ Nerd\ Font\ Mono\ 11 set guifont=Inconsolata\ Nerd\ Font\ Mono\ 11
" Remove ugly vertical lines on window division
set fillchars+=vert:\
" "
set linespace=5 set linespace=5
@ -66,16 +99,32 @@ set number
set wrap set wrap
" Tab control " Tab control
set noexpandtab " tabs ftw set expandtab
set smarttab " tab respects 'tabstop', 'shiftwidth', and 'softtabstop' set tabstop=2
set tabstop=4 " the visible width of tabs set softtabstop=2
set softtabstop=4 " edit as if the tabs are 4 characters wide set shiftwidth=2
set shiftwidth=4 " number of spaces to use for indent and unindent set textwidth=80
set shiftround " round indent to a multiple of 'shiftwidth' set autoindent
set smartindent
" python
au BufNewFile,BufRead *.py
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=79
\ set expandtab
\ set autoindent
\ set fileformat=unix
" js, html, css
au BufNewFile,BufRead *.js, *.html, *.css
\ set noexpandtab
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2
" Configure backspace so it acts as it should act " Let the cursor traverse to the previous or following line when at the or the
set backspace=indent,eol,start " end of a line
set whichwrap+=<,>,h,l set whichwrap=b,s,<,>,[,]
" Search " Search
set ignorecase " Ignore case when searching set ignorecase " Ignore case when searching
@ -95,18 +144,16 @@ set lazyredraw
" For regular expressions turn magic on " For regular expressions turn magic on
set magic set magic
" Auto indent
set ai
" Smart indent
set si
" Disable scrollbars (real hackers don't use scrollbars for navigation!) " Disable scrollbars (real hackers don't use scrollbars for navigation!)
set guioptions-=r set guioptions-=r
set guioptions-=R set guioptions-=R
set guioptions-=l set guioptions-=l
set guioptions-=L set guioptions-=L
" Spell checking
set spell
set spelllang=fr,en
""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""
@ -121,29 +168,24 @@ set guioptions-=L
" Installing the Plug plugin manager " Installing the Plug plugin manager
source $HOME/.vim/plug.vim source $HOME/.vim/plug.vim
" Start NERDTree if no file is pass as arg " Start startify if no arg
autocmd StdinReadPre * let s:std_in=1 autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * autocmd VimEnter *
\ if argc() == 0 \ if argc() == 0
\ && !exists("s:std_in") \ && !exists("s:std_in")
\ | Startify \ | Startify
\ | NERDTree
\ | endif \ | endif
" Close vim if the only window left open is a NERDTree " needed so deoplete can auto select the first suggestion
autocmd BufEnter * set completeopt+=noinsert
\ if (winnr("$") == 1 " comment this line to enable autocompletion preview window
\ && exists("b:NERDTree") " (displays documentation related to the selected completion option)
\ && b:NERDTree.isTabTree()) " disabled by default because preview makes the window flicker
\ | q " set completeopt-=preview
\ | endif
" If more than one window and previous buffer was NERDTree, go back to it. " autocompletion of files and commands behaves like shell
autocmd BufEnter * " (complete only the common part, list the options that match)
\ if bufname('#') =~# "^NERD_tree_" set wildmode=list:longest
\ && winnr('$') > 1
\ | b#
\ | endif
@ -174,8 +216,9 @@ endif
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let base16colorspace=256 " Access colors present in 256 colorspace" let base16colorspace=256 " Access colors present in 256 colorspace"
" set background=dark set background=dark
colorscheme abstract " colorscheme abstract
colorscheme sourcerer
@ -190,40 +233,72 @@ colorscheme abstract
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" "
" Markdown review " BufTabLine
" "
let vim_markdown_preview_toggle=1 hi TabLineSel ctermbg=green ctermfg=black guibg=green guifg=black
let vim_markdown_preview_toggle=2 hi PmenuSel ctermbg=white ctermfg=white guibg=white guifg=white
let vim_markdown_preview_browser='x-www-browser'
" "
" NERDTree " Defx
" "
let g:NERDTreeQuitOnOpen=0 " close NERDTree after a file is opened " Set appearance
call defx#custom#option(
\ '_', {
\ 'winwidth': 40,
\ 'split': 'vertical',
\ 'direction': 'botright',
\ 'show_ignored_files': 0,
\ 'buffer_name': 'defxplorer',
\ 'toggle': 1,
\ 'columns': 'icon:indent:icons:filename',
\ 'resume': 1,
\ }
\ )
call defx#custom#column(
\ 'icon', {
\ 'directory_icon': '▸',
\ 'opened_icon': '▾',
\ }
\ )
call defx#custom#column(
\ 'mark', {
\ 'readonly_icon': '✗',
\ 'selected_icon': '✓',
\ }
\ )
" "
" Startify " Deoplete
" "
" let g:startify_custom_header = 'startify#center(startify#fortune#cowsay())' if using_neovim
let g:deoplete#enable_at_startup = 1
endif
" let g:startify_session_dir = '~/.vim/session' "
" FZF
"
" This is the default extra key bindings
let g:fzf_action = {
\ 'enter': 'e',
\ 'ctrl-h': 'split',
\ 'ctrl-v': 'vsplit'
\ }
" Preview window
let g:fzf_preview_window = 'right:60%'
if has('nvim') && !exists('g:fzf_layout')
autocmd! FileType fzf
autocmd FileType fzf set laststatus=0 noshowmode noruler
\| autocmd BufLeave <buffer> set laststatus=2 showmode ruler
endif
" let g:startify_lists = [ "
" \ { 'type': 'files', 'header': ['RÉCENTS'] }, " Header
" \ { 'type': 'sessions', 'header': ['SESSIONS'] }, "
" \ { 'type': 'bookmarks', 'header': ['MARQUES-PAGES'] }, let g:header_field_author = 'Jeff LANCE'
" \ ] let g:header_field_author_email = 'email@jefflance.me'
let g:header_auto_add_header = 0
" let g:startify_enable_special = 0
" let g:startify_files_number = 5
" let g:startify_bookmarks = [
" \ '~/.vimrc',
" \ '~/.vim/keybindings.vim',
" \ '~/.vim/plug.vim',
" \ '~/.vim/scripts.vim',
" \ '~/Projets/latex/latex-homework'
" \ ]
" "
" Lightline " Lightline
@ -248,6 +323,52 @@ let g:lightline = {
\ 'subseparator': { 'left': '', 'right': '' } \ 'subseparator': { 'left': '', 'right': '' }
\ } \ }
"
" Markdown review
"
let vim_markdown_preview_toggle=1
let vim_markdown_preview_browser='x-www-browser'
"
" REPL
"
let g:repl_program = {
\ 'python': ['ipython'],
\ 'default': ['zsh'],
\ 'r': ['R'],
\ 'lua': ['lua'],
\ 'vim': ['vim -e']
\ }
let g:repl_predefine_python = {
\ 'numpy': 'import numpy as np',
\ 'matplotlib': 'from matplotlib import pyplot as plt'
\ }
let g:repl_cursor_down = 1
let g:repl_python_automerge = 1
let g:repl_ipython_version = '7'
let g:repl_position = 3
"
" Startify
"
let g:startify_custom_header = 'startify#center(startify#fortune#cowsay())'
let g:startify_session_dir = '~/.vim/session'
let g:startify_lists = [
\ { 'type': 'files', 'header': ['MRU' . getcwd()] },
\ { 'type': 'sessions', 'header': ['SESSIONS'] },
\ { 'type': 'bookmarks', 'header': ['BOOKMARKS'] },
\ ]
let g:startify_enable_special = 0
let g:startify_files_number = 10
let g:startify_bookmarks = [
\ '~/.config/',
\ '~/.vimrc',
\ '~/.vim/keybindings.vim',
\ '~/.vim/plug.vim',
\ '~/.vim/functions.vim',
\ '~/Projets/latex/latex-homework'
\ ]
" "
" Tmuxline " Tmuxline
" "
@ -263,15 +384,15 @@ let g:tmuxline_separators = {
\ 'left_alt': '>', \ 'left_alt': '>',
\ 'right' : '', \ 'right' : '',
\ 'right_alt' : '', \ 'right_alt' : '',
\ 'space' : ' '} \ 'space' : ' '
let g:tmuxline_theme = 'jellybeans' \ }
let g:tmuxline_theme = 'sourcerer'
" "
" CtrlP " TMux navigator
" "
let g:ctrlp_map = '<C-f>' let g:tmux_navigator_no_mappings = 1
let g:ctrlp_cmd = 'CtrlPMixed' let g:tmux_navigator_save_on_switch = 2
let g:ctrlp_switch_buffer = 'et'
" "
" Vimroom " Vimroom
@ -308,3 +429,5 @@ source $HOME/.vim/functions.vim
" Load keybindings from file " Load keybindings from file
source $HOME/.vim/keybindings.vim source $HOME/.vim/keybindings.vim