Open mkdir700 opened 1 year ago
Before this, environment variables were only set in the current buffer. This is effective for newly opened buffers, but not for already persistent buffers.
Wait, I seem to have misunderstood. It seems that the newly opened buffer will not be set with environment variables.
So, do you think it's necessary to set environment variables for every buffer? @rafi
The reason why I need to set variables for each buffer is that I may open toggleterm from any buffer, so I hope that when toggleterm is activated from any buffer, the virtual environment can be automatically activated in the shell.
closes: #6
Before this, environment variables were only set in the current buffer. This is effective for newly opened buffers, but not for already persistent buffers.
Therefore, my solution is to get all the buffers and iterate through them. If the file of a buffer belongs to the root directory, then set environment variables for that buffer.