Csound Csound-dev Csound-tekno Search About

[Csnd] macvim tool

Date2014-01-08 10:08
Frompeiman khosravi
Subject[Csnd] macvim tool
Dear all, 

I've finally put together a package for using csound in macvim. It's largely based on modifications of Luis Jure's vimtools as well as some 3rd paty plug-ins and some scripts that I've written myself. To install, just unzip the downloaded file, change dotvimrc to ~/.vimrc and dotvim directory to ~/.vim

If you already use macvim and have installed any plug-ins before, then I'd advice you to back up your .vimrc file and .vim directory before following the above steps. Or else merge them, if you know what you're doing. 


The included features are: 

- Running csound inside an interactive terminal    
- Autocomplete opcodes

The shortcuts are:

alt+\ to open the interactive terminal (using the 'screen' plug-in)
alt+c to render csd inside this terminal window
alt+x stop render
alt+d open the manual page for the opcode name under the curser
alt+h open the index page of the manual
shift+alt+c comment out the selected lines
shift+alt+x uncomment the selected lines

(Obviously these can be changed.)
 
I haven't got autocomplete for many opcodes yet but I'm working on the file. Basically, to use this feature type something like:

oscil[press the tab key]

...and press the tab key again for the cursor to jump to the next input variable of the opcode.

Let me know if you require any more info.

Cheers,
Peiman  

P

Date2014-01-10 18:48
FromPaul Batchelor
SubjectRe: [Csnd] macvim tool
Is it macvim exclusively or can it be used in vim? 




On Wed, Jan 8, 2014 at 5:08 AM, peiman khosravi <peimankhosravi@gmail.com> wrote:
Dear all, 

I've finally put together a package for using csound in macvim. It's largely based on modifications of Luis Jure's vimtools as well as some 3rd paty plug-ins and some scripts that I've written myself. To install, just unzip the downloaded file, change dotvimrc to ~/.vimrc and dotvim directory to ~/.vim

If you already use macvim and have installed any plug-ins before, then I'd advice you to back up your .vimrc file and .vim directory before following the above steps. Or else merge them, if you know what you're doing. 


The included features are: 

- Running csound inside an interactive terminal    
- Autocomplete opcodes

The shortcuts are:

alt+\ to open the interactive terminal (using the 'screen' plug-in)
alt+c to render csd inside this terminal window
alt+x stop render
alt+d open the manual page for the opcode name under the curser
alt+h open the index page of the manual
shift+alt+c comment out the selected lines
shift+alt+x uncomment the selected lines

(Obviously these can be changed.)
 
I haven't got autocomplete for many opcodes yet but I'm working on the file. Basically, to use this feature type something like:

oscil[press the tab key]

...and press the tab key again for the cursor to jump to the next input variable of the opcode.

Let me know if you require any more info.

Cheers,
Peiman  

P


Date2014-01-10 23:34
Frompeiman khosravi
SubjectRe: [Csnd] macvim tool
Hi Paul, 

I think it should work on vim too but there is one applescript I wrote to optimise the interactive shell for myself - it just resizes the terminal window and bring macvim back into focus, so it's not exactly essential. I can make a modified version that doesn't require this script.




On 10 January 2014 18:48, Paul Batchelor <pbatchelor@berklee.edu> wrote:
Is it macvim exclusively or can it be used in vim? 




On Wed, Jan 8, 2014 at 5:08 AM, peiman khosravi <peimankhosravi@gmail.com> wrote:
Dear all, 

I've finally put together a package for using csound in macvim. It's largely based on modifications of Luis Jure's vimtools as well as some 3rd paty plug-ins and some scripts that I've written myself. To install, just unzip the downloaded file, change dotvimrc to ~/.vimrc and dotvim directory to ~/.vim

If you already use macvim and have installed any plug-ins before, then I'd advice you to back up your .vimrc file and .vim directory before following the above steps. Or else merge them, if you know what you're doing. 


The included features are: 

- Running csound inside an interactive terminal    
- Autocomplete opcodes

The shortcuts are:

alt+\ to open the interactive terminal (using the 'screen' plug-in)
alt+c to render csd inside this terminal window
alt+x stop render
alt+d open the manual page for the opcode name under the curser
alt+h open the index page of the manual
shift+alt+c comment out the selected lines
shift+alt+x uncomment the selected lines

(Obviously these can be changed.)
 
I haven't got autocomplete for many opcodes yet but I'm working on the file. Basically, to use this feature type something like:

oscil[press the tab key]

...and press the tab key again for the cursor to jump to the next input variable of the opcode.

Let me know if you require any more info.

Cheers,
Peiman  

P



Date2014-01-11 08:59
Frompeiman khosravi
SubjectRe: [Csnd] macvim tool
For those of you on linux this is probably a better way of doing it. 

Install the following vim plug-ins:


Then unzip this file and install its content as follows (replacing existing fils when necessary):

o place 'csound.snippets' inside ~/.vim/snippets/ (or where ever snipMate installs this folder on you system)
o place the content of 'syntax' inside ~/.vim/syntax/ 
o place the content of 'macros' inside ~/.vim/macros/
o place the content of terminalScreen inside ~/.vim/terminalScreen (creating the folder if it doesn't exist)

Add these lines to the end of your ~/.vimrc file:

map ;o :Sex <CR>
map <C-J> <C-W>j
map <C-K> <C-W>k
map <C-l> <C-W>l
map <C-h> <C-W>h
map ;] :tabnext<CR>
map ;[ :tabprev<CR>
map ≠ :ScreenSend<CR>  
map « :source ~/.vim/terminalScreen/runScreen.vim<CR>  
map ≥ :source ~/.vim/terminalScreen/closeScreen.vim<CR>  




 



On 10 January 2014 23:34, peiman khosravi <peimankhosravi@gmail.com> wrote:
Hi Paul, 

I think it should work on vim too but there is one applescript I wrote to optimise the interactive shell for myself - it just resizes the terminal window and bring macvim back into focus, so it's not exactly essential. I can make a modified version that doesn't require this script.

On 10 January 2014 18:48, Paul Batchelor <pbatchelor@berklee.edu> wrote:
Is it macvim exclusively or can it be used in vim? 




On Wed, Jan 8, 2014 at 5:08 AM, peiman khosravi <peimankhosravi@gmail.com> wrote:
Dear all, 

I've finally put together a package for using csound in macvim. It's largely based on modifications of Luis Jure's vimtools as well as some 3rd paty plug-ins and some scripts that I've written myself. To install, just unzip the downloaded file, change dotvimrc to ~/.vimrc and dotvim directory to ~/.vim

If you already use macvim and have installed any plug-ins before, then I'd advice you to back up your .vimrc file and .vim directory before following the above steps. Or else merge them, if you know what you're doing. 


The included features are: 

- Running csound inside an interactive terminal    
- Autocomplete opcodes

The shortcuts are:

alt+\ to open the interactive terminal (using the 'screen' plug-in)
alt+c to render csd inside this terminal window
alt+x stop render
alt+d open the manual page for the opcode name under the curser
alt+h open the index page of the manual
shift+alt+c comment out the selected lines
shift+alt+x uncomment the selected lines

(Obviously these can be changed.)
 
I haven't got autocomplete for many opcodes yet but I'm working on the file. Basically, to use this feature type something like:

oscil[press the tab key]

...and press the tab key again for the cursor to jump to the next input variable of the opcode.

Let me know if you require any more info.

Cheers,
Peiman  

P




Date2014-01-11 18:37
FromPaul Batchelor
SubjectRe: [Csnd] macvim tool
I will look into this very soon. Thanks again!

-P


On Sat, Jan 11, 2014 at 3:59 AM, peiman khosravi <peimankhosravi@gmail.com> wrote:
For those of you on linux this is probably a better way of doing it. 

Install the following vim plug-ins:


Then unzip this file and install its content as follows (replacing existing fils when necessary):

o place 'csound.snippets' inside ~/.vim/snippets/ (or where ever snipMate installs this folder on you system)
o place the content of 'syntax' inside ~/.vim/syntax/ 
o place the content of 'macros' inside ~/.vim/macros/
o place the content of terminalScreen inside ~/.vim/terminalScreen (creating the folder if it doesn't exist)

Add these lines to the end of your ~/.vimrc file:

map ;o :Sex <CR>
map <C-J> <C-W>j
map <C-K> <C-W>k
map <C-l> <C-W>l
map <C-h> <C-W>h
map ;] :tabnext<CR>
map ;[ :tabprev<CR>
map ≠ :ScreenSend<CR>  
map « :source ~/.vim/terminalScreen/runScreen.vim<CR>  
map ≥ :source ~/.vim/terminalScreen/closeScreen.vim<CR>  




 
On 10 January 2014 23:34, peiman khosravi <peimankhosravi@gmail.com> wrote:
Hi Paul, 

I think it should work on vim too but there is one applescript I wrote to optimise the interactive shell for myself - it just resizes the terminal window and bring macvim back into focus, so it's not exactly essential. I can make a modified version that doesn't require this script.

On 10 January 2014 18:48, Paul Batchelor <pbatchelor@berklee.edu> wrote:
Is it macvim exclusively or can it be used in vim? 




On Wed, Jan 8, 2014 at 5:08 AM, peiman khosravi <peimankhosravi@gmail.com> wrote:
Dear all, 

I've finally put together a package for using csound in macvim. It's largely based on modifications of Luis Jure's vimtools as well as some 3rd paty plug-ins and some scripts that I've written myself. To install, just unzip the downloaded file, change dotvimrc to ~/.vimrc and dotvim directory to ~/.vim

If you already use macvim and have installed any plug-ins before, then I'd advice you to back up your .vimrc file and .vim directory before following the above steps. Or else merge them, if you know what you're doing. 


The included features are: 

- Running csound inside an interactive terminal    
- Autocomplete opcodes

The shortcuts are:

alt+\ to open the interactive terminal (using the 'screen' plug-in)
alt+c to render csd inside this terminal window
alt+x stop render
alt+d open the manual page for the opcode name under the curser
alt+h open the index page of the manual
shift+alt+c comment out the selected lines
shift+alt+x uncomment the selected lines

(Obviously these can be changed.)
 
I haven't got autocomplete for many opcodes yet but I'm working on the file. Basically, to use this feature type something like:

oscil[press the tab key]

...and press the tab key again for the cursor to jump to the next input variable of the opcode.

Let me know if you require any more info.

Cheers,
Peiman  

P