Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== VIM + TMUX Setup tutorial ====== **Overview: ** One way to use Konduktiva is with VIM and TMUX. This can act as your editor for Konduktiva. ===== About The Two Programs ==== Vim is a editor. [[https://www.vim.org/|Click here to learn more about it]]. TMUX is a terminal multiplexer. We will use it to send code between terminal windows. [[https://github.com/tmux/tmux/wiki|Click here to learn more about it]] ===== Installation ===== ==== VIM ==== If you are on Windows you will have to install VIM from the [[https://www.vim.org/download.php|VIM website download page]]. VIM comes with most UNIX based systems including MacOS. ==== TMUX ==== Install TMUX based on the install instructions for your system [[https://github.com/tmux/tmux/wiki/Installing|here]] ===== Check If Installed ===== ==== VIM ==== Open a terminal window and type: <code> vim </code> If VIM has been installed correctly you should see something like this: {{ :vim-clean-install-screenshot.png?800 |}} To quit vim press these buttons. Do not type the plusses "+" but type the rest. No capital letters. CTRL+ c + : + ! + q More usage instructions about VIM will be given later. ===== TMUX ===== Open a terminal window and type: <code> tmux </code> If TMUX has been installed correctly you should see something like this: {{ :tmux-screenshot.png?800 |}} Type this in the same terminal window to exit TMUX: <code> exit </code> More usage instructions about TMUX will be given later. ===== Configuration ===== A useful tool to automatically configure TMUX and VIM to work correctly for Konduktiva can be found on the Konduktiva Github. DISCLAIMER: The tool will create a vimrc(vim configuration) file if it does not find one in your system and in the correct location. If it does find a vimrc file, it will bind shortcuts for vim to the buttons F3, F8,, F9, F11, <SPACE + ;>, <SPACE+ ->, if it does not find anything bound to them. These configuration will be added to the very end of the vimrc file so they can be easily removed. The tool will also create a tslime.vim file in your plugins folder inside your vim folder if it does not detect one. The code could potentially have issue and may make breaking changes. If you choose to use the code, the author of the code is in no way responsible for anything caused by the code. [[https://github.com/renickbell/konduktiva/blob/main/auto-configure-vim-tmux.js|If you have read the disclaimer, here is the download to the code]] After downloading the code, open a terminal window and navigate to the directory where you have installed the code. [[https://gist.github.com/bradtraversy/cc180de0edee05075a6139e42d5f28ce#file-system-navigation|Here is a simple resource for navigating the terminal]]. After you have navigated using the terminal to the right place, run this: <code> node auto-configure-vim-tmux.js </code> ===== Basic Usage Insturctions ===== ==== VIM ==== If you have used the vim configuration file given you by the auto configuration tool, here are some useful shortcuts. <csv> Keys, Action SPACE + S, Save and quit, SPACE + s, save, SPACE + Q, Quit without saving, SPACE + q, quit, </csv> Here is some basic knowledge about vim: Press i to enter insert mode to start typing (insert mode) Press escape to get out of insert mode. Type vimtutor to learn more about vim. ==== TMUX ==== Useful TMUX shortcuts: <csv> Keys, action, CTRL + B + C, new pane, CTRL + B + J, last pane CTRL + B + K, next pane </csv> Learn more about tmux [[https://github.com/tmux/tmux/wiki/Getting-Started|here]] ===== Working With Konduktiva ===== What I like to do is have two terminals side by side in half screen. Then, the two terminal windows will have TMUX running in them. My VIM editor will be on one side and nodejs with Konduktiva running in it will be on the right. Like so: {{ :vim-and-tmux-konduktiva-interface.png?800 |}} I can send things to Konduktiva from vim by pressing the enter key: <html> <img style="width: 80%; height: auto" src='http://konduktiva.org/lib/exe/fetch.php?media=using-tmux-vim-konduktiva-interface.gif'/> </html> [[first_steps|Click here to start learning about Konduktiva]] vim-tmux-setup.txt Last modified: 2024/02/25 18:51by steve.wang