I recently installed the vim extension python-mode, which includes pyflakes. When I save a python file to disk, pyflakes automatically detects errors and style violations and displays them in a quickfix window. This screencast shows that hitting enter on an item from the quickfix window should jump to the corresponding line in the source code, but when I hit enter I get the error "E21: Cannot make changes, 'modifiable' is off". I can make the buffer modifiable with :set ma
, and then jumping works, but I don't want to have to set this every time.
As suggested in this answer, I've tried to see if a plugin is making the buffer non-modifiable, but couldn't discover anything.
:verbose set modifiable?
nonmodifiable
:verbose setlocal modifiable?
nonmodifiable
Here is my .vimrc
:
"set nocompatible
autocmd! bufwritepost .vimrc source %
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
set cpo&vim
set background=dark
syntax on
set smartindent
set shiftwidth=4
set expandtab
set tabstop=4
set bs=2
set tags=./tags;,/usr/share/vim/vim81/doc/tags;,$HOME/.local/lib/python3.7/site-packages/torch/tags
set tags+=$HOME/.local/lib/python3.7/site-packages/torch/tags
set tags+=$HOME/.local/lib/python3.7/site-packages/torchvision/tags
set tags+=$HOME/.local/lib/python3.7/site-packages/nltk/tags
set tags+=$HOME/anaconda3/lib/python3.7/site-packages/gensim/tags
set foldmethod=indent
set relativenumber
set number
inoremap kj <Esc>
vnoremap s: sort<CR>
vnoremap < <gv "better indentation
vnoremap > >gv "better indentation
nnoremap ZZ :update<cr>
nnoremap qq :wq<cr>
nnoremap mm :vsplit<cr><C-w><C-w>
nnoremap MM :split<cr><C-w><C-w>
" Ctrl-j/k deletes blank line below/above, and Alt-j/k inserts."
nnoremap <silent><C-j> m`:silent +g/\m^\s*$/d<CR>``:noh<CR>
nnoremap <silent><C-k> m`:silent -g/\m^\s*$/d<CR>``:noh<CR>
nnoremap <silent><A-j> :set paste<CR>m`o<Esc>``:set nopaste<CR>
nnoremap <silent><A-k> :set paste<CR>m`O<Esc>``:set nopaste<CR>
nnoremap <Enter> i<Enter><Esc>
nnoremap <S-Enter> o<Esc>
nnoremap <S-tab> i<tab><Esc>l
nnoremap <C-x> ^i#<Esc>
nnoremap <C-d> yy^i#<Esc>p
nnoremap <S-s> diwea,<Esc>p4bex
You have a mapping for <enter>
which overrides the normal enter behavior:
nnoremap <Enter> i<Enter><Esc>
When you hit enter, you will go to insert mode in the quicklist, which isn't allowed.
HTH