From 9e06311db167a4ca76bcc34c81d02abd19bfe8a1 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Fri, 10 Dec 2021 19:54:38 +0100 Subject: A bunch of changes to different filetypes for vim. --- stow/vim/.vim/ftplugin/ruby/ruby.vim | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 stow/vim/.vim/ftplugin/ruby/ruby.vim (limited to 'stow/vim/.vim/ftplugin/ruby/ruby.vim') diff --git a/stow/vim/.vim/ftplugin/ruby/ruby.vim b/stow/vim/.vim/ftplugin/ruby/ruby.vim new file mode 100644 index 0000000..41b806a --- /dev/null +++ b/stow/vim/.vim/ftplugin/ruby/ruby.vim @@ -0,0 +1,27 @@ +" ~/.vim/ftplugin/ruby/ruby.vim +" Ruby-specific vim configuration + +" Tabs are expanded to 4 spaces +setlocal tabstop=2 shiftwidth=2 expandtab +" Show existing tabs (they can be deleted with :retab) +setlocal list + +" Mappings +" +" For SonicPi + +if expand('%:p') =~ 'sonicPi' + + let mapleader = " " + + nnoremap C :sp ~/.vim/ftplugin/ruby/ruby.vim + + nnoremap p :w:!sonic-pi-tool eval-file % + nnoremap :w:!sonic-pi-tool stop && sonic-pi-tool eval-file % + nnoremap s :!sonic-pi-tool stop + + let mapleader = "," + + inoremap loop loop do <+++>end<++>?<+++>cf> + +endif -- cgit v1.2.1