ianding1 / leetcode.vim

Solve LeetCode problems in Vim!
MIT License
311 stars 43 forks source link

Add support for splitting description and code template in separate splits. #47

Closed TerminalWitchcraft closed 4 years ago

TerminalWitchcraft commented 4 years ago

I have implemented a basic splitting functionality where the problem description is opened in a new split above the code template split with size equal to the length of the problem description. Some buffer local options are set accordingly.

This resolves #28

Currently, the problem description split is of type nofile, therefore cannot be saved.

Another way of adding this feature would be to remove the _remove_description method before sending user code to leetcode. This way, leetcode will return appropriate line numbers. I am fine with either.