refactor functions in mappings into its proper place
added alias to vim to restore session if detected