Refact: move dotfiles to specific folder and split dotfile in 2

This commit is contained in:
2019-05-11 11:03:34 +02:00
parent 5eab1b8cb2
commit 686c46a1e7
39 changed files with 314 additions and 28 deletions

View File

@@ -0,0 +1,6 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =4
let g:netrw_dirhist_1='/home/lafrite/Cours/Prof/Enseignements/2017-2018/6e'
let g:netrw_dirhist_2='/home/lafrite/Cours/Prof/Enseignements/2017-2018/6e/Nombres_Calculs'
let g:netrw_dirhist_3='/home/lafrite/Cours/Prof/Enseignements/2017-2018/6e/Nombres_Calculs/Numerations_divers'
let g:netrw_dirhist_4='/home/lafrite/scripts/config/vim/bundle/TTCoach/macros/ttcoach/en'

View File

@@ -0,0 +1,19 @@
snippet todo "A python todo mark" b
# TODO: ${1:desc} |`date`
endsnippet
snippet tvar "testing a variable" b
print("${1:Varname} -> ", $1)
endsnippet
# Unittest
snippet deftest "test function without docstrings" b
def test_${1:function}(`!p
if snip.indent:
snip.rv = 'self' `):
${0:pass}
endsnippet

View File

@@ -0,0 +1,123 @@
" Lines number
set number
" Always show the statusline
set laststatus=2
" Necessary to show Unicode glyphs
set encoding=utf8
" tab length
set tabstop=4
" smart tab
set smartindent
" Tab to..?
set shiftround
" Display edition mode
set showmode
" Ignore case in search mode
set ignorecase
" Override the 'ignorecase' option if the search pattern
" contains upper case characters.
set smartcase
" Display uncomplete commands (??)
set showcmd
" Vim file name completion relative to current file
set autochdir
" While typing a search command, show immediately where the
" so far typed pattern matches.
set incsearch
" Use <C-L> to clear the highlighting of :set hlsearch.
set hlsearch
if maparg('<C-L>', 'n') ==# ''
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
endif
" Turn on the WiLd menu
set wildmenu
" Ignore compiled files
set wildignore=*.o,*~,*.pyc,*.swp
" Wrap lines
set wrap
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set noswapfile
" Having relative number for lines
set relativenumber
" Display tab and ends of lines
" Shortcut to rapidly toggle `set list`
nmap <leader>L :set list!<CR>
" Behaviour of tab
set tabstop =4
set shiftwidth =4
set softtabstop =4
set expandtab
" Folding
set foldmethod=indent
" Use the same symbols as TextMate for tabstops and EOLs
" set listchars=tab:▸\ ,eol:¬
set listchars=nbsp,tab:··,trail,extends:▶,precedes:◀
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
"
" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
set mouse=a
endif
" Decorations
" ====================
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
endif
" When set to "dark", Vim will try to use colors that look
" good on a dark background. When set to "light", Vim will
" try to use colors that look good on a light background.
" Any other value is illegal.
set background=dark
" Color Scheme
colorscheme zenburn
set cursorline
" Align blocks of text and keep them selected
vmap < <gv
vmap > >gv
" Spelling
set spelllang=fr
" Set and unset spelling correction
map <silent> <F7> "<Esc>:silent setlocal spell! spelllang=en<CR>"
map <silent> <F6> "<Esc>:silent setlocal spell! spelllang=fr<CR>"
autocmd BufRead,BufNewFile *.{md,tex,rst} setlocal spell
execute "set colorcolumn=" . join(range(81,335), ',')
" Show what is written!
set conceallevel=0

View File

@@ -0,0 +1,72 @@
" Supertab
let g:SuperTabDefaultCompletionType = "context"
" Ultisnips
let g:ultisnips_python_style='sphinx'
let g:UltiSnipsEditSplit='vertical'
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
" let g:UltiSnipsExpandTrigger="tab"
let g:UltiSnipsExpandTrigger="<c-k>"
" Airline
let g:airline_powerline_fonts = 1
let g:tmuxline_powerline_separators = 0
" Nerdtree
let NERDTreeIgnore = ['.pyc$']
"autocmd VimEnter * NERDTree
" Vim-notes
let g:notes_directories = ['~/Documents/Notes']
let g:notes_suffix = '.md'
" Ale
let g:ale_sign_column_always = 1
let g:ale_sign_error = '⚑'
let g:ale_sign_warning = '⚐'
" fzf
" Search and switch buffers
nmap <leader>b :Buffers<cr>
" Find files by name under the current directory
nmap <leader>f :Files<cr>
" Find files by name under the home directory
nmap <leader>h :Files ~/<cr>
" Search content in the current file
" nmap <leader>l :BLines<cr>
" Search content in the current file and in files under the current directory
" nmap <leader>g :Ag<cr>
" IndentLine
let g:indentLine_fileTypeExclude = ['tex']
" let g:indentLine_concealcursor = ''
" let g:indentLine_conceallevel = 1
"
" Vim-polyglot
" let g:LatexBox_no_mappings = 1
let g:polyglot_disabled = ["latex"]
" Vimtex
let g:vimtex_compiler_latexmk = {
\ 'backend' : 'jobs',
\ 'background' : 1,
\ 'build_dir' : '',
\ 'callback' : 0,
\ 'continuous' : 1,
\ 'options' : [
\ '-pdf',
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ '-silent',
\ '-shell-escape',
\ ],
\}
" Les fichiers sty et cls sont vus comme des fichiers tex
autocmd BufRead,BufNewFile *.{sty,cls} setlocal syntax=tex
autocmd FileType latex unmap <leader>ll
autocmd FileType latex nmap <leader>ll <plug>(vimtex-compile)

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python
# encoding: utf-8
__all__ = []
# -----------------------------
# Reglages pour 'vim'
# vim:set autoindent expandtab tabstop=4 shiftwidth=4:
# cursor: 16 del