This commit is contained in:
xdrm-brackets 2017-01-12 11:06:53 +01:00
parent 7f695e44e7
commit 9c09b879c0
8 changed files with 137 additions and 23 deletions

3
.vimrc
View File

@ -22,6 +22,9 @@ so ~/.vim/config/plugins/tagbar.vim
so ~/.vim/config/plugins/airline.vim
so ~/.vim/config/plugins/nerdtree.vim
so ~/.vim/config/plugins/ultisnips.vim
so ~/.vim/config/plugins/easy-align.vim
so ~/.vim/config/plugins/instant-markdown.vim
so ~/.vim/config/plugins/markdown.vim
" Vim default

View File

@ -8,6 +8,12 @@ call vundle#begin()
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'evidens/vim-twig'
Plugin 'tpope/vim-markdown'
Plugin 'suan/vim-instant-markdown'
Plugin 'dhruvasagar/vim-table-mode'
Plugin 'tpope/vim-haml'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'junegunn/vim-easy-align'
Plugin 'jelera/vim-javascript-syntax'
Plugin 'elzr/vim-json'

View File

@ -3,26 +3,42 @@ colorscheme onedark
syntax on
set mouse=a
set ignorecase
set smartcase
set splitright
set autoindent
set relativenumber " show relative number lines
set number " but absolute number for current line
set showcmd
set encoding=utf-8
scriptencoding utf-8
" show whitespaces
set list
set listchars=eol,tab:>\ ,trail:⋅
""""""""""
" search "
""""""""""
set ignorecase " ignore case
set smartcase " . only if not all in lowercase
set incsearch " show matches when typing pattern
set hlsearch " highlights matches
"""""""""""
" display "
"""""""""""
set splitright " split right instead of left
set autoindent " auto linebreak indentation
set relativenumber " show relative number for lines
set number " but absolute number for current line
set showcmd " show typed command
set encoding=utf-8 " set encoding
scriptencoding utf-8 " set encoding ??
set list " for next command
set listchars=eol,tab:>\ ,trail:⋅ " characters to display instead of whitespace characters
" default fold method
set foldmethod=syntax
" use filetype
filetype plugin on
" search path recursive
set path+=**
" abbreviations
ab tf tabfind
ab f find
" functions
" yank buffer "0 to clipboard
map <C-Y> :tabnew<CR>"0p:saveas /tmp/cclip.tmp<CR>:!cat % \| xclip -sel clip<CR>:!rm %<CR>:q!<CR>
" paste clipboard to buffer "0
map <C-P> :tabnew<CR>:.!xclip -sel clip -o<CR>ggdG:q!<CR>

View File

@ -1,16 +1,30 @@
" words backwards with SHIFT-w
nnoremap <silent> W b
" INSERT mode -> go back to NORMAL mode
imap <silent> <C-J> <Esc>
" new tab
nmap <silent> <C-t> :tabnew<CR>
" new line shortcut (ctrl+o)
nnoremap <silent> <CR> o<CR><Esc>
nnoremap <silent> ee o<Esc>
" switch windows
" nmap <silent> <C-k> :wincmd k<CR>
" nmap <silent> <C-j> :wincmd j<CR>
" nmap <silent> <C-h> :wincmd h<CR>
" nmap <silent> <C-l> :wincmd l<CR>
" switch tabs
nmap <silent> <C-h> :tabprevious<CR>
nmap <silent> <C-l> :tabnext<CR>
" bind window : scroll + cursor
nmap <silent> <F10> :set scrollbind<CR>:set cursorbind<CR>
nmap <silent> <F12> :set noscrollbind<CR>:set nocursorbind<CR>
" split windows
nnoremap <silent> <C-W>\| :vnew<CR>
nnoremap <silent> <C-W>= :new<CR>
" bind windows: scroll + cursor
let bounded_wins=0
nmap <silent> <F12> :if (bounded_wins%2 == 0) \| set scrollbind \| set cursorbind \| else \| set noscrollbind \| set nocursorbind \| endif \| let bounded_wins=bounded_wins+1<CR>
" autoread (real-time changes)
nmap <silent> <F9> :set autoread<CR>
" reloads file
nmap <silent> <F5> :e!<CR>

View File

@ -0,0 +1,5 @@
" Start interactive EasyAlign in visual mode (e.g. vipga)
map ga <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
map ga <Plug>(EasyAlign)

View File

@ -0,0 +1,10 @@
" to update only when some events occurs (not real-time)
let g:instant_markdown_slow = 1
" launched on startup if markdown
let g:instant_markdown_autostart = 1
" allow external content (images, etc)
let g:instant_markdown_allow_external_content = 1

View File

@ -0,0 +1,2 @@
" consider *.md as markdown files
autocmd BufNewFile,BufReadPost *.md set filetype=markdown

58
snippets/js.snippets Normal file
View File

@ -0,0 +1,58 @@
snippet comh
/**nippet definition.***********************
* ${1:Program Name} *
* ${2: Date} *
***************************
* Designed & Developed by *
* xdrm-brackets *
***************************
* https://xdrm.io/ *
**************************/
$0
snippet comc
/* [${1:Number}] ${2:Chapter Title}
=========================================================*/
$0
snippet comcc
/* (${1:Number}) ${2:Chapter Title}
---------------------------------------------------------*/
$0
snippet coms
/* (${1:Number}) ${2:Section Title} */
$0
snippet comss
{${1:Number}} ${2:Section Title} //
$0
snippet comf
${1:RESUME DE LA FONCTION}
*
* @${2:nomParam}<${3:typeParam}> ${4:Description du param}
*
* @return ${5:nomRetour}<${6:typeRetour}> ${7:Description du retour}
*
*/${8:}
$0
snippet comcf
/* [${1:Number}] ${2:Chapter Title}
*
* @inputname<inputype> inputdesc
*
* @return outputname<outputtype> outputdesc
*
=========================================================*/
$0
snippet comccf
/* (${1:Number}) ${2:Chapter Title}
*
* @inputname<inputype> inputdesc
*
* @return outputname<outputtype> outputdesc
*
---------------------------------------------------------*/
$0
snippet comt
/************************************************
****${1: Titre }****
************************************************/
$0