![]() ![]() Last, configuring the ocp-indent by adding these lines to ~/.ocp/nf": # These are `normal`, `apprentice` and `JaneStreet` and set different defaults. You can use tools like pathogen to manage the installed plugins in Vim. smartindent smartindent works similarly to autoindent but recognizes the syntax for some languages such as C language. This ensures that ocp-indent will indent the current line after you input Enter, “if”, “else”, etc. python-indent.vim Installation Requirements Configuration g:pythonindentcontinue g:pythonindentrightbracket g:pythonindentmultilinestatement Testing License README.rst python-indent. Vim has four methods of indentation, namely: Autoindent this method uses indent from the previous line for the file type you are editing. Third, to make ocp-indent be automatically invoked by autoindent, add the ocp-indent-vim script. You can use = to format the code selected or the current line now. Let opamshare=system("opam config var share | tr -d 'n'")Įxecute "autocmd FileType ocaml source".opamshare."/vim/syntax/ocp-indent.vim" Second, configure vim by adding these lines to your ~/.vimrc: au BufEnter *.ml setf ocaml This defaults to 0, which means that multiline strings are not indented. You can configure the initial indentation of multiline strings using g:pythonpep8indentmultilinestring (which can also be set per buffer). ![]() First, install ocp-indent after installing opam: $ opam install ocp-indent Configuration g:pythonpep8indentmultilinestring.
0 Comments
Leave a Reply. |