[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ranger-users] Ranger as an IDE filemanager
From: |
John Z. |
Subject: |
[Ranger-users] Ranger as an IDE filemanager |
Date: |
Tue, 25 Jul 2017 10:27:35 -0400 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
Hi all,
some time ago I posted (in a wrong thread, by accident) about how
I'd like each instance of ranger to open files in different instance
of Vim (using --remote flag), and pondered if making a custom edit
command would be the right way.
I've since managed to solve the problem much more elegantly using
rifle, so I figured I'd share the tip for every developer out there
who likes to compose their own IDE.
1. run Vim with different server names ('vim --servername
'VIM-PROJECTX')
2. in ~/.config/ranger/rifle.conf, find a catch-all line:
# Define the "editor" for text files as first action
mime ^text, label editor = $EDITOR -- "$@"
and add your projects workspaces using 'path' condition, eg.:
path Q/workspace/lookalikes, mime ^text, label editor = vim
--servername 'VIM-AO' --remote "$@"
I'm sure this can be improved to avoid modifying rifle.conf for every
project - for example, keeping an empty file in the folder and then
assembling vim servername using that file's name.
For an extra touch, switch Ranger to MC mode (Shift+~).
Cheers!
- [Ranger-users] Ranger as an IDE filemanager,
John Z. <=