Reputation: 93
Everything was working fine, until I forcibly closed Vim while editing my .vimrc file. I also, not thinking straight, deleted the .vimrc.swp file. So, I lost the changes, no big deal.
But now, Vim doesn't show the mode which I am currently in at the time. Very annoying. I only found one post saying something similar but no real solution.
I have tried:
:set showmode
while in a file, nothing happens.
set showmode
in my .vimrc file, nothing happens - yes I saved, closed vim, even closed the terminal, still nothing.
I also renamed .vimrc to important, just to make sure it wasn't something going on inside the file. This also did not fix the issue.
I even made sure my system was updated. Still nothing.
I will post my .vimrc here, nothing special or crazy, I don't think. Any help would be appreciated.
syntax on
set showmode
set history=50
set laststatus=2
filetype plugin indent on
filetype plugin on
autocmd FileType text setlocal textwidth=80
" set ruler on
set ruler
"set line break at blank char
set showbreak=\ \ \ \ \ \ \ \ "
set linebreak
set wrap
"set to not be completely Vi compatible
set nocompatible
"show line numbers
set nu
"search while typing
set incsearch
"hightlight search pattern
set hlsearch
"auto-index
set autoindent
set autowrite
"set tab in normal mode to 4
set shiftwidth=4
"set tab to 4
set tabstop=4
set softtabstop=4
set noexpandtab
set textwidth=80
"Remap keys: modes:
"i insert mode
"escape, exit insert move
inoremap jk <esc>
"quit without saving
inoremap qq <esc>:q!<return>
"save and quit
inoremap ww <esc>:wq<return>
"Shortcuts for C
inoremap \io #include <stdio.h><CR><CR><CR>//Main Function<cr>int main(int argc, char* argv[])<CR>{<CR><CR><TAB>return 0;<cr>}
"Shortcuts for Rails
inoremap \c <div class="code"><cr><cr></div>
inoremap \p <span class="prompt"> </span>
"n normal
"redo last undo
"nnoremap re <c-r>
"quit without saving
nnoremap qi :q!<return>
"colon instead of semi-colon
"nnoremap ; :
"save
"nnoremap ww :w<return>
"save and quit
"nnoremap wq :wq<return>
"move to beginning of line
nnoremap fj 0
"move to end of line
nnoremap fk $
"move down one page
"nnoremap '' <c-f>
"switch to window on left
nnoremap \w <c-w>
"switch to window on right
"nnoremap wl <c-w>l
"v visual
"exit visual mode
vnoremap jk <esc>
"c command
"highlight Normal ctermbg=Black
"highlight Comment ctermbg=DarkGray
"highlight Constant ctermbg=Blue
"highlight NonText ctermbg=Black
"highlight Special ctermbg=DarkMagenta
highlight Cursor ctermfg=White
syntax enable
I even left all the comments in there just for the sake of completion. Thanks
Upvotes: 1
Views: 10132
Reputation: 93
Okay, so I figured out the problem.
I must have edited the profile preferences, and in the Colors tab there is a Bold color:
option. I must have unchecked the box that says same as text color
and the color was black, as is my background.
After checking the box, the --Insert-- was present.
Simple solution, to a problem that I was making complicated.
Thanks to everyone for trying to help.
Upvotes: 4
Reputation: 172698
I don't know if it matters (according to the help, it shouldn't), but
:set nocompatible
should be the first option that is set in your ~/.vimrc
, because it affects many other options as well (and the 'showmode'
default is one of them).
Upvotes: 1