Skip to content

Commit

Permalink
Use ftdetect/ and ftplugin/ directories
Browse files Browse the repository at this point in the history
  • Loading branch information
munshkr committed Jul 15, 2014
1 parent bac6379 commit 4ec824a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
1 change: 1 addition & 0 deletions ftdetect/tidal.vim
@@ -0,0 +1 @@
autocmd BufRead,BufNewFile *.tidal setfiletype haskell.tidal
17 changes: 15 additions & 2 deletions ftplugin/tidal.vim
Expand Up @@ -2,8 +2,21 @@ function! _EscapeText_haskell_tidal(text)
let l:text = Remove_block_comments(a:text)
let l:lines = Lines(Tab_to_spaces(l:text))
let l:lines = Remove_line_comments(l:lines)
"let l:lines = Perhaps_prepend_let(l:lines)
"let l:lines = Indent_lines(l:lines)
let l:lines = Wrap_if_multi(l:lines)
return Unlines(l:lines)
endfunction


xmap <buffer> <localleader>s <Plug>SlimeRegionSend
nmap <buffer> <localleader>s <Plug>SlimeLineSend
nmap <buffer> <localleader>ss <Plug>SlimeParagraphSend
" *hush* zzz...
nmap <buffer> <localleader>zz :<c-u>SlimeSend1 hush<cr>
" silence binding for each channel
let c = 1
while c <= 9
execute 'nmap <buffer> <localleader>z'.c.' :<c-u>SlimeSend1 d'.c.' silence<cr>'
let c += 1
endwhile
18 changes: 1 addition & 17 deletions plugin/tidal.vim
@@ -1,21 +1,5 @@
autocmd BufRead,BufNewFile *.tidal setfiletype haskell.tidal

" vim-slime global options
let g:slime_target="tmux"
let g:slime_paste_file=tempname()
let g:slime_default_config={"socket_name": "default", "target_pane": "tidal:0.1"}

let g:slime_no_mappings=1

autocmd FileType haskell.tidal xmap <buffer> <localleader>s <Plug>SlimeRegionSend
autocmd FileType haskell.tidal nmap <buffer> <localleader>s <Plug>SlimeLineSend
autocmd FileType haskell.tidal nmap <buffer> <localleader>ss <Plug>SlimeParagraphSend
" *hush* zzz...
autocmd FileType haskell.tidal nmap <buffer> <localleader>zz :<c-u>SlimeSend1 hush<cr>
" silence binding for each channel
let c = 1
while c <= 9
execute 'autocmd FileType haskell.tidal nmap <buffer> <localleader>'.c.' :<c-u>SlimeSend1 d'.c.' silence<cr>'
let c += 1
endwhile

0 comments on commit 4ec824a

Please sign in to comment.