Nota: editado para fornecer mais informações.
Eu modifiquei ~/.vimrc
significativamente (embora algumas das minhas modificações iniciais tenham sido feitas em todo o sistema /etc/vim/vimrc
). Provavelmente não importa, já que sou realmente o único usuário do meu laptop e certamente o único que edita no Vim.
De qualquer forma, com o pacote Vim-LaTeX, os arquivos abrem com dobras inseridas automaticamente nas seções e subseções dos .tex
documentos. Isso é bom (e útil de vez em quando), desde que as dobras estejam todas abertas quando eu começar. As duas linhas a seguir parecem realizar o que eu queroquando o .vimrc
é originado!
set foldmethod=syntax
autocmd Syntax tex normal zR
Minha solução frustrante tem sido a origem manual .vimrc
quando abro um documento para começar a editar (ou pelo menos invocar zR
manualmente para abrir todas as dobras).
Minha pergunta em cascata é:
Existe uma variável ambiental que eu possa definir (no meu .bash_profile
, digamos) que diga ao Vim para procurar .vimrc
no meu diretório pessoal? Este não deveria ser o padrão? Como faço para corrigir isso?
EDITAR: Não consegui resolver isso. Incluí a saída detalhada do vim -V
. Parece que o meu ~/.vimrc
está sendo originado, mas talvez outras coisas o estejam "substituindo" na memória?
chdir(/home/sammy)
fchdir() to previous dir
sourcing "/home/sammy/.vimrc"
Searching for "debian.vim" in "/home/sammy/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/home/sammy/.vim/after"
Searching for "/home/sammy/.vim/debian.vim"
Searching for "/usr/share/vim/vimfiles/debian.vim"
Searching for "/usr/share/vim/vim74/debian.vim"
chdir(/usr/share/vim/vim74)
fchdir() to previous dir
line 10: sourcing "/usr/share/vim/vim74/debian.vim"
finished sourcing /usr/share/vim/vim74/debian.vim
continuing in /home/sammy/.vimrc
Searching for "/usr/share/vim/vimfiles/after/debian.vim"
Searching for "/home/sammy/.vim/after/debian.vim"
chdir(/usr/share/vim/vim74/syntax)
fchdir() to previous dir
line 20: sourcing "/usr/share/vim/vim74/syntax/syntax.vim"
Searching for "syntax/synload.vim" in "/home/sammy/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/home/sammy/.vim/after"
Searching for "/home/sammy/.vim/syntax/synload.vim"
Searching for "/var/lib/vim/addons/syntax/synload.vim"
Searching for "/usr/share/vim/vimfiles/syntax/synload.vim"
Searching for "/usr/share/vim/vim74/syntax/synload.vim"
chdir(/usr/share/vim/vim74/syntax)
fchdir() to previous dir
line 19: sourcing "/usr/share/vim/vim74/syntax/synload.vim"
Searching for "syntax/syncolor.vim" in "/home/sammy/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/home/sammy/.vim/after"
Searching for "/home/sammy/.vim/syntax/syncolor.vim"
Searching for "/var/lib/vim/addons/syntax/syncolor.vim"
Searching for "/usr/share/vim/vimfiles/syntax/syncolor.vim"
Searching for "/usr/share/vim/vim74/syntax/syncolor.vim"
chdir(/usr/share/vim/vim74/syntax)
fchdir() to previous dir
line 21: sourcing "/usr/share/vim/vim74/syntax/syncolor.vim"
finished sourcing /usr/share/vim/vim74/syntax/syncolor.vim
continuing in /usr/share/vim/vim74/syntax/synload.vim
Searching for "/usr/share/vim/vimfiles/after/syntax/syncolor.vim"
Searching for "/var/lib/vim/addons/after/syntax/syncolor.vim"
Searching for "/home/sammy/.vim/after/syntax/syncolor.vim"
finished sourcing /usr/share/vim/vim74/syntax/synload.vim
continuing in /usr/share/vim/vim74/syntax/syntax.vim
Searching for "filetype.vim" in "/home/sammy/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/home/sammy/.vim/after"
Searching for "/home/sammy/.vim/filetype.vim"
Searching for "/var/lib/vim/addons/filetype.vim"
Searching for "/usr/share/vim/vimfiles/filetype.vim"
Searching for "/usr/share/vim/vim74/filetype.vim"
chdir(/usr/share/vim/vim74)
fchdir() to previous dir
line 25: sourcing "/usr/share/vim/vim74/filetype.vim"
Searching for "ftdetect/*.vim" in "/home/sammy/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/home/sammy/.vim/after"
Searching for "/home/sammy/.vim/ftdetect/*.vim"
Searching for "/var/lib/vim/addons/ftdetect/*.vim"
Searching for "/usr/share/vim/vimfiles/ftdetect/*.vim"
Searching for "/usr/share/vim/vim74/ftdetect/*.vim"
Searching for "/usr/share/vim/vimfiles/after/ftdetect/*.vim"
Searching for "/var/lib/vim/addons/after/ftdetect/*.vim"
Searching for "/home/sammy/.vim/after/ftdetect/*.vim"
not found in 'runtimepath': "ftdetect/*.vim"
finished sourcing /usr/share/vim/vim74/filetype.vim
continuing in /usr/share/vim/vim74/syntax/syntax.vim
Searching for "/usr/share/vim/vimfiles/after/filetype.vim"
Searching for "/var/lib/vim/addons/after/filetype.vim"
Searching for "/home/sammy/.vim/after/filetype.vim"
finished sourcing /usr/share/vim/vim74/syntax/syntax.vim
continuing in /home/sammy/.vimrc
Searching for "syntax/syncolor.vim" in "/home/sammy/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/home/sammy/.vim/after"
Searching for "/home/sammy/.vim/syntax/syncolor.vim"
Searching for "/var/lib/vim/addons/syntax/syncolor.vim"
Searching for "/usr/share/vim/vimfiles/syntax/syncolor.vim"
Searching for "/usr/share/vim/vim74/syntax/syncolor.vim"
chdir(/usr/share/vim/vim74/syntax)
fchdir() to previous dir
line 25: sourcing "/usr/share/vim/vim74/syntax/syncolor.vim"
finished sourcing /usr/share/vim/vim74/syntax/syncolor.vim
continuing in /home/sammy/.vimrc
Searching for "/usr/share/vim/vimfiles/after/syntax/syncolor.vim"
Searching for "/var/lib/vim/addons/after/syntax/syncolor.vim"
Searching for "/home/sammy/.vim/after/syntax/syncolor.vim"
Searching for "filetype.vim" in "/home/sammy/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/home/sammy/.vim/after"
Searching for "/home/sammy/.vim/filetype.vim"
Searching for "/var/lib/vim/addons/filetype.vim"
Searching for "/usr/share/vim/vimfiles/filetype.vim"
Searching for "/usr/share/vim/vim74/filetype.vim"
chdir(/usr/share/vim/vim74)
fchdir() to previous dir
line 28: sourcing "/usr/share/vim/vim74/filetype.vim"
finished sourcing /usr/share/vim/vim74/filetype.vim
continuing in /home/sammy/.vimrc
Searching for "/usr/share/vim/vimfiles/after/filetype.vim"
Searching for "/var/lib/vim/addons/after/filetype.vim"
Searching for "/home/sammy/.vim/after/filetype.vim"
Searching for "ftplugin.vim" in "/home/sammy/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/home/sammy/.vim/after"
Searching for "/home/sammy/.vim/ftplugin.vim"
Searching for "/var/lib/vim/addons/ftplugin.vim"
Searching for "/usr/share/vim/vimfiles/ftplugin.vim"
Searching for "/usr/share/vim/vim74/ftplugin.vim"
chdir(/usr/share/vim/vim74)
fchdir() to previous dir
line 28: sourcing "/usr/share/vim/vim74/ftplugin.vim"
finished sourcing /usr/share/vim/vim74/ftplugin.vim
continuing in /home/sammy/.vimrc
Searching for "/usr/share/vim/vimfiles/after/ftplugin.vim"
Searching for "/var/lib/vim/addons/after/ftplugin.vim"
Searching for "/home/sammy/.vim/after/ftplugin.vim"
Searching for "indent.vim" in "/home/sammy/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/home/sammy/.vim/after"
Searching for "/home/sammy/.vim/indent.vim"
Searching for "/var/lib/vim/addons/indent.vim"
Searching for "/usr/share/vim/vimfiles/indent.vim"
Searching for "/usr/share/vim/vim74/indent.vim"
chdir(/usr/share/vim/vim74)
fchdir() to previous dir
line 28: sourcing "/usr/share/vim/vim74/indent.vim"
finished sourcing /usr/share/vim/vim74/indent.vim
continuing in /home/sammy/.vimrc
Searching for "/usr/share/vim/vimfiles/after/indent.vim"
Searching for "/var/lib/vim/addons/after/indent.vim"
Searching for "/home/sammy/.vim/after/indent.vim"
finished sourcing /home/sammy/.vimrc
Searching for "plugin/**/*.vim" in "/home/sammy/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/home/sammy/.vim/after"
Searching for "/home/sammy/.vim/plugin/**/*.vim"
Searching for "/var/lib/vim/addons/plugin/**/*.vim"
chdir(/var/lib/vim/addons/plugin)
fchdir() to previous dir
sourcing "/var/lib/vim/addons/plugin/SyntaxFolds.vim"
finished sourcing /var/lib/vim/addons/plugin/SyntaxFolds.vim
chdir(/var/lib/vim/addons/plugin)
fchdir() to previous dir
sourcing "/var/lib/vim/addons/plugin/filebrowser.vim"
finished sourcing /var/lib/vim/addons/plugin/filebrowser.vim
chdir(/var/lib/vim/addons/plugin)
fchdir() to previous dir
sourcing "/var/lib/vim/addons/plugin/imaps.vim"
finished sourcing /var/lib/vim/addons/plugin/imaps.vim
chdir(/var/lib/vim/addons/plugin)
fchdir() to previous dir
sourcing "/var/lib/vim/addons/plugin/libList.vim"
finished sourcing /var/lib/vim/addons/plugin/libList.vim
chdir(/var/lib/vim/addons/plugin)
fchdir() to previous dir
sourcing "/var/lib/vim/addons/plugin/remoteOpen.vim"
finished sourcing /var/lib/vim/addons/plugin/remoteOpen.vim
Searching for "/usr/share/vim/vimfiles/plugin/**/*.vim"
Searching for "/usr/share/vim/vim74/plugin/**/*.vim"
chdir(/usr/share/vim/vim74/plugin)
fchdir() to previous dir
sourcing "/usr/share/vim/vim74/plugin/getscriptPlugin.vim"
finished sourcing /usr/share/vim/vim74/plugin/getscriptPlugin.vim
chdir(/usr/share/vim/vim74/plugin)
fchdir() to previous dir
sourcing "/usr/share/vim/vim74/plugin/gzip.vim"
finished sourcing /usr/share/vim/vim74/plugin/gzip.vim
chdir(/usr/share/vim/vim74/plugin)
fchdir() to previous dir
sourcing "/usr/share/vim/vim74/plugin/matchparen.vim"
finished sourcing /usr/share/vim/vim74/plugin/matchparen.vim
chdir(/usr/share/vim/vim74/plugin)
fchdir() to previous dir
sourcing "/usr/share/vim/vim74/plugin/netrwPlugin.vim"
finished sourcing /usr/share/vim/vim74/plugin/netrwPlugin.vim
chdir(/usr/share/vim/vim74/plugin)
fchdir() to previous dir
sourcing "/usr/share/vim/vim74/plugin/rrhelper.vim"
finished sourcing /usr/share/vim/vim74/plugin/rrhelper.vim
chdir(/usr/share/vim/vim74/plugin)
fchdir() to previous dir
sourcing "/usr/share/vim/vim74/plugin/spellfile.vim"
finished sourcing /usr/share/vim/vim74/plugin/spellfile.vim
chdir(/usr/share/vim/vim74/plugin)
fchdir() to previous dir
sourcing "/usr/share/vim/vim74/plugin/tarPlugin.vim"
finished sourcing /usr/share/vim/vim74/plugin/tarPlugin.vim
chdir(/usr/share/vim/vim74/plugin)
fchdir() to previous dir
sourcing "/usr/share/vim/vim74/plugin/tohtml.vim"
finished sourcing /usr/share/vim/vim74/plugin/tohtml.vim
chdir(/usr/share/vim/vim74/plugin)
fchdir() to previous dir
sourcing "/usr/share/vim/vim74/plugin/vimballPlugin.vim"
finished sourcing /usr/share/vim/vim74/plugin/vimballPlugin.vim
chdir(/usr/share/vim/vim74/plugin)
fchdir() to previous dir
sourcing "/usr/share/vim/vim74/plugin/zipPlugin.vim"
finished sourcing /usr/share/vim/vim74/plugin/zipPlugin.vim
Searching for "/usr/share/vim/vimfiles/after/plugin/**/*.vim"
Searching for "/var/lib/vim/addons/after/plugin/**/*.vim"
Searching for "/home/sammy/.vim/after/plugin/**/*.vim"
Responder1
Para Unix/Linux, o vim procura $HOME/.vimrc
, então a primeira coisa que pode afetar isso é, obviamente, a variável de ambiente $HOME
. Isso está definido no seu sistema (deveria ser /home/your_user_name
.
Não vi nenhum lugar que especifique onde esse arquivo deveria estar, então a única outra maneira que posso ver seria se você começasse com a -u
opção de especificar um .vimrc diferente:
-u <vimrc> Use <vimrc> instead of any .vimrc
-U <gvimrc> Use <gvimrc> instead of any .gvimrc
Suponho que você poderia tentar usar isso como solução alternativa, mas provavelmente seria melhor corrigir o problema, se possível. Nunca tive um caso em que não fosse lido .vimrc
.