If you find interesting.. I have added this to my .vimrc
When I open any python file automatically my current work directory is changed to the opened file path, with this path, I could open ipython console in cwd. This helps me to read .csv path files, etc... without issues.
" Change automatically current directory to open file directory
autocmd BufEnter * silent! lcd %:p:h
" map to start ipython in current file directory
nnoremap st :execute 'SlimeSend1 cd 'fnameescape(expand('%:p:h')):execute 'SlimeSend1 clear':SlimeSend1 ipython3
If you find interesting.. I have added this to my .vimrc
When I open any python file automatically my current work directory is changed to the opened file path, with this path, I could open ipython console in cwd. This helps me to read .csv path files, etc... without issues.
" Change automatically current directory to open file directory
autocmd BufEnter * silent! lcd %:p:h
" map to start ipython in current file directoryst :execute 'SlimeSend1 cd 'fnameescape(expand('%:p:h')):execute 'SlimeSend1 clear':SlimeSend1 ipython3
nnoremap
hopes it helps to improve a llitle more :)