My previous question has been answered by YCor; so I am asking a new one with a reasonable additional assumption. See the previous question for the background and motivation.
General question: does there exist a complete, nondiscrete topological group $G$ such that all subgroups of $G$ are closed? Or, does there exist a complete, nondiscrete topological vector space $V$ such that all vector subspaces of $V$ are closed?
More specific question: does there exist a complete, nondiscrete topological abelian group $A$ with linear topology such that all subgroups of $A$ are closed? Or, does there exist a complete, nondiscrete topological vector space $V$ with linear topology such that all vector subspaces of $V$ are closed?
Let me collect here the less obvious definitions appearing in the questions above. A topological abelian group $A$ is said to have linear topology if the open subgroups form a base of neighborhoods of zero in $A$. A topological vector space $V$ is said to have linear topology if open vector subspaces form a base of neighborhoods of zero in $V$. The notion of a topological vector space with linear topology presumes that the topology on the ground field $k$ is discrete.
I define completeness in the case of a linear topology only, as the general case is more involved. A topological abelian group $A$ with linear topology is said to be (Hausdorff and) complete if the natural map $A\longrightarrow \varprojlim_{U\subset A}A/U$ is bijective. Here the projective limit is taken over all the open subgroups $U\subset A$. For topological vector spaces with linear topology, the definition of completeness is similar.