def buffer_register_keys(self):
		# This removes ALL mappings and is probably not what you want.
		# vim.command('nmapclear <buffer>')

		# Add new ones based on mode.
		if self.mode == MODE_INSERT:
			self._buffer_register_keys_standard()
			self._buffer_register_keys_special(KEYS['dualmode_insert'])
			self._buffer_register_keys_extra(self.config['g:filepirate_map_extra_insert'])
		elif self.mode == MODE_NORMAL:
			self._buffer_register_keys_special(KEYS['dualmode_normal'])
			self._buffer_register_keys_extra(self.config['g:filepirate_map_extra_normal'])
		else:
			# Original behaviour, no explicit modes.
			assert self.mode == MODE_NOMODE
			self._buffer_register_keys_standard()
			self._buffer_register_keys_special(KEYS['normal'])
dataset/ETHPy150Open nfd/filepirate/plugin/vimfilepirate.py/VimFilePirate.buffer_register_keys/original