Use correctly the after directory
This commit is contained in:
		
						parent
						
							b7473e3f4a
						
					
				
				
					commit
					b46ca50536
				
			
							
								
								
									
										1
									
								
								after/ftplugin/ruby/keys.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								after/ftplugin/ruby/keys.vim
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
map <F9> :w<CR>:!ruby -c %<CR>
 | 
			
		||||
							
								
								
									
										24
									
								
								after/ftplugin/ruby/prefs.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								after/ftplugin/ruby/prefs.vim
									
									
									
									
									
										Normal 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
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										24
									
								
								after/ftplugin/ruby/utils.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								after/ftplugin/ruby/utils.vim
									
									
									
									
									
										Normal 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>
 | 
			
		||||
		Reference in New Issue
	
	Block a user