1
0
mirror of https://github.com/xlogerais/config-vim synced 2025-06-13 02:36:55 +02:00

Use correctly the after directory

This commit is contained in:
Xavier Logerais (Numericable - Ingénierie Système)
2015-03-06 15:47:40 +01:00
parent b7473e3f4a
commit b46ca50536
6 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,23 @@
" ----- [ Preferences for lua ] -----
" show cursor
setlocal cursorline cursorcolumn
hi CursorLine term=none cterm=none
" show line numbers
setlocal number numberwidth=4
" show matching parentheses
setlocal showmatch
" indent
setlocal autoindent cindent smartindent
" tabs
setlocal tabstop=2
setlocal shiftwidth=2
" use space instead of tabs
setlocal expandtab
"set highlight

View File

@ -0,0 +1,23 @@
" ----- [ Preferences for php ] -----
" show cursor
setlocal cursorline cursorcolumn
hi CursorLine term=none cterm=none
" show line numbers
setlocal number numberwidth=4
" show matching parentheses
setlocal showmatch
" indent
setlocal autoindent cindent smartindent
" tabs
setlocal tabstop=4
setlocal shiftwidth=4
" use space instead of tabs
setlocal expandtab
"set highlight

View File

@ -0,0 +1,23 @@
" ----- [ Preferences for puppet ] -----
" show cursor
setlocal cursorline cursorcolumn
hi CursorLine term=none cterm=none
" show line numbers
setlocal number numberwidth=4
" show matching parentheses
setlocal showmatch
" indent
setlocal autoindent cindent smartindent
" tabs
setlocal tabstop=2
setlocal shiftwidth=2
" use space instead of tabs
setlocal expandtab
"set highlight

View File

@ -0,0 +1 @@
map <F9> :w<CR>:!ruby -c %<CR>

View File

@ -0,0 +1,24 @@
" ----- [ Preferences for ruby ] -----
" show cursor
setlocal cursorline cursorcolumn
hi CursorLine term=none cterm=none
" show line numbers
setlocal number numberwidth=4
" show matching parentheses
setlocal showmatch
" indent
setlocal autoindent cindent smartindent
" tabs
setlocal tabstop=2
setlocal shiftwidth=2
" use space instead of tabs
setlocal expandtab
"set highlight

View File

@ -0,0 +1,24 @@
" from https://github.com/vim-ruby/vim-ruby/wiki/VimRubySupport
if !exists( "*RubyEndToken" )
function RubyEndToken()
let current_line = getline( '.' )
let braces_at_end = '{\s*\(|\(,\|\s\|\w\)*|\s*\)\?$'
let stuff_without_do = '^\s*\(class\|if\|unless\|begin\|case\|for\|module\|while\|until\|def\)'
let with_do = 'do\s*\(|\(,\|\s\|\w\)*|\s*\)\?$'
if match(current_line, braces_at_end) >= 0
return "\<CR>}\<C-O>O"
elseif match(current_line, stuff_without_do) >= 0
return "\<CR>end\<C-O>O"
elseif match(current_line, with_do) >= 0
return "\<CR>end\<C-O>O"
else
return "\<CR>"
endif
endfunction
endif
imap <buffer> <CR> <C-R>=RubyEndToken()<CR>